coupling_import_options
Stable type · Document types
Tier: stable · Kind: type · Topic: Document types
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
| not exported | CouplingImportOptions | not exported | CouplingImportOptions | CouplingImportOptions |
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 importrefs resolve against. Defaults to ‘.’.loadRef— Resolve arefstring to a parsed coupling-library document. Defaults to a synchronous Nodefsreader. Tests may supply an in-memory resolver.
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.
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).