Version: dev

coupling_import_options

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
not exportedCouplingImportOptionsnot exportedCouplingImportOptionsCouplingImportOptions

Julia

Julia does not export this type.

TypeScript

interface CouplingImportOptions {
    basePath?: string;
    loadRef?: (ref: string, basePath: string) => unknown;
}

Options controlling how coupling_import refs are resolved at flatten.

Properties

  • basePath — Directory the import refs resolve against. Defaults to ‘.’.
  • loadRef — Resolve a ref string to a parsed coupling-library document. Defaults to a synchronous Node fs reader. Tests may supply an in-memory resolver.

Source

Python

Python does not export this type.

Rust

pub struct CouplingImportOptions<'a> {
    pub base_path: String,
    pub load_ref: Option<Box<dyn Fn(&str, &str) -> Result<Value, DiagnosticError> + 'a>>,
}

Options controlling how coupling_import refs are resolved at flatten.

Source · Rust docs

Go

type CouplingImportOptions struct {
	// BasePath is the directory import `ref`s resolve against. Defaults to ".".
	BasePath string
	// LoadRef resolves a `ref` string to a parsed coupling-library document
	// (raw JSON view). Defaults to a filesystem reader. Tests may supply an
	// in-memory resolver.
	LoadRef func(ref, basePath string) (map[string]any, error)
}

CouplingImportOptions controls how coupling_import refs are resolved at flatten (mirrors the TS CouplingImportOptions).

Source · Go docs