/** * @file Internal - createContext * @module mkbuild/internal/createContext */ import type { Context, Task } from '../interfaces/index.mjs'; import type { FileSystemAdapter } from '../types/index.mjs'; import type { PackageJson } from '@flex-development/pkg-types'; /** * Creates a build context for the given build `task`. * * @todo throw if `absWorkingDir` is not a directory * @todo throw if `task.ext` is not a valid `OutputExtension` * @todo throw if `task.outdir` is not a directory * @todo throw if `task.source` is not a directory when not bundling * @todo throw if `task.source` is not a file when bundling * * @internal * @async * * @param {Partial} task - Build task object * @param {PackageJson?} [pkg={}] - Relevant `package.json` object * @param {Partial} [fs=fsa] - Custom file system methods * @return {Promise} Build context for `task` */ declare function createContext(task: Partial, pkg?: PackageJson, fs?: Partial): Promise; export default createContext;