/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

export interface JsMacroError {
  kind: number
  message: string
}
export function initSentry(): void
export function closeSentry(): void
export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
export function findFirstFile(names: Array<string>): string | null
export function findNodeModule(module: string, from: string): string | null
export function hashString(s: string): string
export function hashBuffer(buf: Buffer): string
export function optimizeImage(kind: string, buf: Buffer): Buffer
export interface ParcelNapiBuildOptions {
  registerWorker: (...args: any[]) => any
}
export interface ParcelNapiBuildResult {
  
}
export interface ParcelNapiOptions {
  fs?: object
  nodeWorkers?: number
  options: object
  packageManager?: object
  threads?: number
  tracerOptions?: object
}
/**
 * This function is run in the Nodejs worker context upon initialization
 * to notify the main thread that a Nodejs worker thread has started
 *
 * A Rust channel is transferred to the worker via JavaScript `worker.postMessage`.
 * The worker then calls `register_worker`, supplying it with an object containing
 * callbacks.
 *
 * The callbacks are later called from the main thread to send work to the worker.
 *
 * |-------------| --- Init channel ----> |-------------------|
 * | Main Thread |                        | Worker Thread (n) |
 * |-------------| <-- Worker wrapper --- |-------------------|
 *
 *                 **Later During Build**
 *
 *                 -- Resolver.resolve -->
 *                 <- DependencyResult ---
 *
 *                 -- Transf.transform -->
 *                 <--- Array<Asset> -----
 */
export function registerWorker(channel: JsTransferable, worker: object): void
export interface JsFileSystemOptions {
  canonicalize: (...args: any[]) => any
  read: (...args: any[]) => any
  isFile: (...args: any[]) => any
  isDir: (...args: any[]) => any
  includeNodeModules?: NapiSideEffectsVariants
}
export interface FileSystem {
  fs?: JsFileSystemOptions
  includeNodeModules?: NapiSideEffectsVariants
  conditions?: number
  moduleDirResolver?: (...args: any[]) => any
  mode: number
  entries?: number
  extensions?: Array<string>
  packageExports: boolean
  typescript?: boolean
}
export interface ResolveOptions {
  filename: string
  specifierType: string
  parent: string
  packageConditions?: Array<string>
}
export interface FilePathCreateInvalidation {
  filePath: string
}
export interface FileNameCreateInvalidation {
  fileName: string
  aboveFilePath: string
}
export interface GlobCreateInvalidation {
  glob: string
}
export interface ResolveResult {
  resolution: unknown
  invalidateOnFileChange: Array<string>
  invalidateOnFileCreate: Array<FilePathCreateInvalidation | FileNameCreateInvalidation | GlobCreateInvalidation>
  query?: string
  sideEffects: boolean
  error: unknown
  moduleType: number
}
export interface JsInvalidations {
  invalidateOnFileChange: Array<string>
  invalidateOnFileCreate: Array<FilePathCreateInvalidation | FileNameCreateInvalidation | GlobCreateInvalidation>
  invalidateOnStartup: boolean
}
export function testingRunParcelJsTransformerPlugin(targetPath: string): unknown
export function transform(opts: object): unknown
export function transformAsync(opts: object): object
export class Hash {
  constructor()
  writeString(s: string): void
  writeBuffer(buf: Buffer): void
  finish(): string
}
export class ParcelNapi {
  nodeWorkerCount: number
  constructor(napiOptions: ParcelNapiOptions)
  build(options: ParcelNapiBuildOptions): object
  buildAssetGraph(options: ParcelNapiBuildOptions): object
}
export class Resolver {
  constructor(projectRoot: string, options: FileSystem)
  resolve(options: ResolveOptions): ResolveResult
  resolveAsync(): object
  resolveAsync(options: ResolveOptions): object
  getInvalidations(path: string): JsInvalidations
  getInvalidations(path: string): JsInvalidations
}
