-
Notifications
You must be signed in to change notification settings - Fork 12k
/
Copy pathbabel-loader.d.ts
34 lines (33 loc) · 1.25 KB
/
babel-loader.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
declare module 'babel-loader' {
type BabelLoaderCustomizer<T> = (babel: typeof import('@babel/core')) => {
customOptions?(
this: import('webpack').loader.LoaderContext,
loaderOptions: Record<string, unknown>,
loaderArguments: { source: string; map?: unknown },
): Promise<{ custom?: T; loader: Record<string, unknown> }>;
config?(
this: import('webpack').loader.LoaderContext,
configuration: import('@babel/core').PartialConfig,
loaderArguments: { source: string; map?: unknown; customOptions: T },
): import('@babel/core').TransformOptions;
result?(
this: import('webpack').loader.LoaderContext,
result: import('@babel/core').BabelFileResult,
context: {
source: string;
map?: unknown;
customOptions: T;
configuration: import('@babel/core').PartialConfig;
options: import('@babel/core').TransformOptions;
},
): import('@babel/core').BabelFileResult;
};
function custom<T>(customizer: BabelLoaderCustomizer<T>): import('webpack').loader.Loader;
}