| 
									
										
										
										
											2025-06-03 01:18:59 +08:00
										 |  |  | import type { RawSourceMap } from "../lib/NormalModule"; | 
					
						
							| 
									
										
										
										
											2024-08-06 11:08:48 +08:00
										 |  |  | import type Module from "../lib/Module"; | 
					
						
							| 
									
										
										
										
											2021-05-07 23:50:08 +08:00
										 |  |  | import type { validate } from "schema-utils"; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | import type { AssetInfo } from "../lib/Compilation"; | 
					
						
							|  |  |  | import type { ResolveOptionsWithDependencyType } from "../lib/ResolverFactory"; | 
					
						
							|  |  |  | import type Compilation from "../lib/Compilation"; | 
					
						
							|  |  |  | import type Compiler from "../lib/Compiler"; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:53:28 +08:00
										 |  |  | import type NormalModule from "../lib/NormalModule"; | 
					
						
							| 
									
										
										
										
											2021-10-26 00:13:49 +08:00
										 |  |  | import type Hash from "../lib/util/Hash"; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:53:28 +08:00
										 |  |  | import type { InputFileSystem } from "../lib/util/fs"; | 
					
						
							| 
									
										
										
										
											2021-04-20 16:06:34 +08:00
										 |  |  | import type { Logger } from "../lib/logging/Logger"; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | import type { | 
					
						
							|  |  |  | 	ImportModuleCallback, | 
					
						
							|  |  |  | 	ImportModuleOptions | 
					
						
							|  |  |  | } from "../lib/dependencies/LoaderPlugin"; | 
					
						
							|  |  |  | import type { Resolver } from "enhanced-resolve"; | 
					
						
							| 
									
										
										
										
											2024-09-20 21:51:06 +08:00
										 |  |  | import type { | 
					
						
							|  |  |  | 	Environment, | 
					
						
							|  |  |  | 	HashDigestLength, | 
					
						
							|  |  |  | 	HashSalt, | 
					
						
							|  |  |  | 	HashDigest, | 
					
						
							|  |  |  | 	HashFunction | 
					
						
							|  |  |  | } from "./WebpackOptions"; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | type ResolveCallback = Parameters<Resolver["resolve"]>[4]; | 
					
						
							| 
									
										
										
										
											2021-05-07 23:50:08 +08:00
										 |  |  | type Schema = Parameters<typeof validate>[0]; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** These properties are added by the NormalModule */ | 
					
						
							|  |  |  | export interface NormalModuleLoaderContext<OptionsType> { | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	version: number; | 
					
						
							| 
									
										
										
										
											2021-05-08 00:10:57 +08:00
										 |  |  | 	getOptions(): OptionsType; | 
					
						
							| 
									
										
										
										
											2021-05-07 23:50:08 +08:00
										 |  |  | 	getOptions(schema: Schema): OptionsType; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	emitWarning(warning: Error): void; | 
					
						
							|  |  |  | 	emitError(error: Error): void; | 
					
						
							|  |  |  | 	getLogger(name?: string): Logger; | 
					
						
							|  |  |  | 	resolve(context: string, request: string, callback: ResolveCallback): any; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	getResolve( | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 		options?: ResolveOptionsWithDependencyType | 
					
						
							|  |  |  | 	): ((context: string, request: string, callback: ResolveCallback) => void) & | 
					
						
							|  |  |  | 		((context: string, request: string) => Promise<string>); | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	emitFile( | 
					
						
							|  |  |  | 		name: string, | 
					
						
							| 
									
										
										
										
											2021-06-17 08:20:15 +08:00
										 |  |  | 		content: string | Buffer, | 
					
						
							| 
									
										
										
										
											2021-04-20 16:07:59 +08:00
										 |  |  | 		sourceMap?: string, | 
					
						
							|  |  |  | 		assetInfo?: AssetInfo | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	): void; | 
					
						
							|  |  |  | 	addBuildDependency(dep: string): void; | 
					
						
							|  |  |  | 	utils: { | 
					
						
							|  |  |  | 		absolutify: (context: string, request: string) => string; | 
					
						
							|  |  |  | 		contextify: (context: string, request: string) => string; | 
					
						
							| 
									
										
										
										
											2024-02-17 01:39:12 +08:00
										 |  |  | 		createHash: (algorithm?: string | typeof Hash) => Hash; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	}; | 
					
						
							|  |  |  | 	rootContext: string; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	fs: InputFileSystem; | 
					
						
							| 
									
										
										
										
											2021-04-20 16:00:32 +08:00
										 |  |  | 	sourceMap?: boolean; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	mode: "development" | "production" | "none"; | 
					
						
							|  |  |  | 	webpack?: boolean; | 
					
						
							| 
									
										
										
										
											2025-05-16 21:49:07 +08:00
										 |  |  | 	hashFunction: HashFunction; | 
					
						
							|  |  |  | 	hashDigest: HashDigest; | 
					
						
							|  |  |  | 	hashDigestLength: HashDigestLength; | 
					
						
							|  |  |  | 	hashSalt: HashSalt; | 
					
						
							| 
									
										
										
										
											2021-04-20 16:08:36 +08:00
										 |  |  | 	_module?: NormalModule; | 
					
						
							|  |  |  | 	_compilation?: Compilation; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	_compiler?: Compiler; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** These properties are added by the HotModuleReplacementPlugin */ | 
					
						
							|  |  |  | export interface HotModuleReplacementPluginLoaderContext { | 
					
						
							|  |  |  | 	hot?: boolean; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** These properties are added by the LoaderPlugin */ | 
					
						
							|  |  |  | export interface LoaderPluginLoaderContext { | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Resolves the given request to a module, applies all configured loaders and calls | 
					
						
							|  |  |  | 	 * back with the generated source, the sourceMap and the module instance (usually an | 
					
						
							|  |  |  | 	 * instance of NormalModule). Use this function if you need to know the source code | 
					
						
							|  |  |  | 	 * of another module to generate the result. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	loadModule( | 
					
						
							|  |  |  | 		request: string, | 
					
						
							|  |  |  | 		callback: ( | 
					
						
							|  |  |  | 			err: Error | null, | 
					
						
							| 
									
										
										
										
											2024-08-06 11:08:48 +08:00
										 |  |  | 			source?: string | Buffer, | 
					
						
							|  |  |  | 			sourceMap?: object | null, | 
					
						
							|  |  |  | 			module?: Module | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 		) => void | 
					
						
							|  |  |  | 	): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	importModule( | 
					
						
							|  |  |  | 		request: string, | 
					
						
							| 
									
										
										
										
											2024-08-06 11:08:48 +08:00
										 |  |  | 		options: ImportModuleOptions | undefined, | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 		callback: ImportModuleCallback | 
					
						
							|  |  |  | 	): void; | 
					
						
							|  |  |  | 	importModule(request: string, options?: ImportModuleOptions): Promise<any>; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | /** The properties are added by https://github.com/webpack/loader-runner */ | 
					
						
							|  |  |  | export interface LoaderRunnerLoaderContext<OptionsType> { | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	/** | 
					
						
							|  |  |  | 	 * Add a directory as dependency of the loader result. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	addContextDependency(context: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Adds a file as dependency of the loader result in order to make them watchable. | 
					
						
							|  |  |  | 	 * For example, html-loader uses this technique as it finds src and src-set attributes. | 
					
						
							|  |  |  | 	 * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	addDependency(file: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	addMissingDependency(context: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Make this loader async. | 
					
						
							|  |  |  | 	 */ | 
					
						
							| 
									
										
										
										
											2021-04-20 16:18:59 +08:00
										 |  |  | 	async(): WebpackLoaderContextCallback; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							| 
									
										
										
										
											2021-04-20 16:08:16 +08:00
										 |  |  | 	 * Make this loader result cacheable. By default it's cacheable. | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	 * A cacheable loader must have a deterministic result, when inputs and dependencies haven't changed. | 
					
						
							|  |  |  | 	 * This means the loader shouldn't have other dependencies than specified with this.addDependency. | 
					
						
							|  |  |  | 	 * Most loaders are deterministic and cacheable. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	cacheable(flag?: boolean): void; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-22 16:01:20 +08:00
										 |  |  | 	callback: WebpackLoaderContextCallback; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Remove all dependencies of the loader result. Even initial dependencies and these of other loaders. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	clearDependencies(): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * The directory of the module. Can be used as context for resolving other stuff. | 
					
						
							|  |  |  | 	 * eg '/workspaces/ts-loader/examples/vanilla/src' | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	context: string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	readonly currentRequest: string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	readonly data: any; | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * alias of addDependency | 
					
						
							|  |  |  | 	 * Adds a file as dependency of the loader result in order to make them watchable. | 
					
						
							|  |  |  | 	 * For example, html-loader uses this technique as it finds src and src-set attributes. | 
					
						
							|  |  |  | 	 * Then, it sets the url's for those attributes as dependencies of the html file that is parsed. | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	dependency(file: string): void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	getContextDependencies(): string[]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	getDependencies(): string[]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	getMissingDependencies(): string[]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * The index in the loaders array of the current loader. | 
					
						
							|  |  |  | 	 * In the example: in loader1: 0, in loader2: 1 | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	loaderIndex: number; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 	readonly previousRequest: string; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	readonly query: string | OptionsType; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 	readonly remainingRequest: string; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 	readonly request: string; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * An array of all the loaders. It is writeable in the pitch phase. | 
					
						
							|  |  |  | 	 * loaders = [{request: string, path: string, query: string, module: function}] | 
					
						
							|  |  |  | 	 * | 
					
						
							|  |  |  | 	 * In the example: | 
					
						
							|  |  |  | 	 * [ | 
					
						
							|  |  |  | 	 *   { request: "/abc/loader1.js?xyz", | 
					
						
							|  |  |  | 	 *     path: "/abc/loader1.js", | 
					
						
							|  |  |  | 	 *     query: "?xyz", | 
					
						
							|  |  |  | 	 *     module: [Function] | 
					
						
							|  |  |  | 	 *   }, | 
					
						
							|  |  |  | 	 *   { request: "/abc/node_modules/loader2/index.js", | 
					
						
							|  |  |  | 	 *     path: "/abc/node_modules/loader2/index.js", | 
					
						
							|  |  |  | 	 *     query: "", | 
					
						
							|  |  |  | 	 *     module: [Function] | 
					
						
							|  |  |  | 	 *   } | 
					
						
							|  |  |  | 	 * ] | 
					
						
							|  |  |  | 	 */ | 
					
						
							| 
									
										
										
										
											2021-04-20 16:06:34 +08:00
										 |  |  | 	loaders: { | 
					
						
							|  |  |  | 		request: string; | 
					
						
							|  |  |  | 		path: string; | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 		query: string; | 
					
						
							|  |  |  | 		fragment: string; | 
					
						
							| 
									
										
										
										
											2021-04-22 16:01:20 +08:00
										 |  |  | 		options: object | string | undefined; | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 		ident: string; | 
					
						
							| 
									
										
										
										
											2021-04-22 16:01:20 +08:00
										 |  |  | 		normal: Function | undefined; | 
					
						
							|  |  |  | 		pitch: Function | undefined; | 
					
						
							|  |  |  | 		raw: boolean | undefined; | 
					
						
							|  |  |  | 		data: object | undefined; | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 		pitchExecuted: boolean; | 
					
						
							|  |  |  | 		normalExecuted: boolean; | 
					
						
							| 
									
										
										
										
											2022-01-21 14:57:32 +08:00
										 |  |  | 		type?: "commonjs" | "module" | undefined; | 
					
						
							| 
									
										
										
										
											2021-04-20 16:06:34 +08:00
										 |  |  | 	}[]; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	 * The resource path. | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | 	 * In the example: "/abc/resource.js" | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	resourcePath: string; | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * The resource query string. | 
					
						
							|  |  |  | 	 * Example: "?query" | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	resourceQuery: string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * The resource fragment. | 
					
						
							|  |  |  | 	 * Example: "#frag" | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	resourceFragment: string; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * The resource inclusive query and fragment. | 
					
						
							|  |  |  | 	 * Example: "/abc/resource.js?query#frag" | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	resource: string; | 
					
						
							| 
									
										
										
										
											2023-03-07 06:39:54 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Target of compilation. | 
					
						
							|  |  |  | 	 * Example: "web" | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	target: string; | 
					
						
							| 
									
										
										
										
											2023-05-30 01:50:48 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	/** | 
					
						
							|  |  |  | 	 * Tell what kind of ES-features may be used in the generated runtime-code. | 
					
						
							|  |  |  | 	 * Example: { arrowFunction: true } | 
					
						
							|  |  |  | 	 */ | 
					
						
							|  |  |  | 	environment: Environment; | 
					
						
							| 
									
										
										
										
											2021-04-20 02:30:58 +08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2021-04-20 13:05:54 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-22 16:54:50 +08:00
										 |  |  | type AdditionalData = { | 
					
						
							|  |  |  | 	webpackAST: object; | 
					
						
							|  |  |  | 	[index: string]: any; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-20 16:18:59 +08:00
										 |  |  | type WebpackLoaderContextCallback = ( | 
					
						
							| 
									
										
										
										
											2025-05-01 22:36:51 +08:00
										 |  |  | 	err: undefined | null | Error, | 
					
						
							| 
									
										
										
										
											2021-04-22 16:54:50 +08:00
										 |  |  | 	content?: string | Buffer, | 
					
						
							| 
									
										
										
										
											2025-06-03 01:18:59 +08:00
										 |  |  | 	sourceMap?: null | string | RawSourceMap, | 
					
						
							| 
									
										
										
										
											2021-04-22 16:54:50 +08:00
										 |  |  | 	additionalData?: AdditionalData | 
					
						
							|  |  |  | ) => void; | 
					
						
							| 
									
										
										
										
											2021-04-20 16:18:59 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | type LoaderContext<OptionsType> = NormalModuleLoaderContext<OptionsType> & | 
					
						
							|  |  |  | 	LoaderRunnerLoaderContext<OptionsType> & | 
					
						
							|  |  |  | 	LoaderPluginLoaderContext & | 
					
						
							|  |  |  | 	HotModuleReplacementPluginLoaderContext; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = ( | 
					
						
							|  |  |  | 	this: LoaderContext<OptionsType> & ContextAdditions, | 
					
						
							|  |  |  | 	remainingRequest: string, | 
					
						
							|  |  |  | 	previousRequest: string, | 
					
						
							|  |  |  | 	data: object | 
					
						
							|  |  |  | ) => string | Buffer | Promise<string | Buffer> | void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = ( | 
					
						
							|  |  |  | 	this: LoaderContext<OptionsType> & ContextAdditions, | 
					
						
							|  |  |  | 	content: string, | 
					
						
							| 
									
										
										
										
											2025-06-03 01:18:59 +08:00
										 |  |  | 	sourceMap?: string | RawSourceMap, | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	additionalData?: AdditionalData | 
					
						
							|  |  |  | ) => string | Buffer | Promise<string | Buffer> | void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type RawLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = ( | 
					
						
							|  |  |  | 	this: LoaderContext<OptionsType> & ContextAdditions, | 
					
						
							|  |  |  | 	content: Buffer, | 
					
						
							| 
									
										
										
										
											2025-06-03 01:18:59 +08:00
										 |  |  | 	sourceMap?: string | RawSourceMap, | 
					
						
							| 
									
										
										
										
											2021-04-23 03:45:06 +08:00
										 |  |  | 	additionalData?: AdditionalData | 
					
						
							|  |  |  | ) => string | Buffer | Promise<string | Buffer> | void; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export type LoaderDefinition< | 
					
						
							|  |  |  | 	OptionsType = {}, | 
					
						
							|  |  |  | 	ContextAdditions = {} | 
					
						
							|  |  |  | > = LoaderDefinitionFunction<OptionsType, ContextAdditions> & { | 
					
						
							|  |  |  | 	raw?: false; | 
					
						
							|  |  |  | 	pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export type RawLoaderDefinition< | 
					
						
							|  |  |  | 	OptionsType = {}, | 
					
						
							|  |  |  | 	ContextAdditions = {} | 
					
						
							|  |  |  | > = RawLoaderDefinitionFunction<OptionsType, ContextAdditions> & { | 
					
						
							|  |  |  | 	raw: true; | 
					
						
							|  |  |  | 	pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export interface LoaderModule<OptionsType = {}, ContextAdditions = {}> { | 
					
						
							|  |  |  | 	default?: | 
					
						
							|  |  |  | 		| RawLoaderDefinitionFunction<OptionsType, ContextAdditions> | 
					
						
							|  |  |  | 		| LoaderDefinitionFunction<OptionsType, ContextAdditions>; | 
					
						
							|  |  |  | 	raw?: false; | 
					
						
							|  |  |  | 	pitch?: PitchLoaderDefinitionFunction<OptionsType, ContextAdditions>; | 
					
						
							|  |  |  | } |