import type { ImportWithDeclaration } from "@observablehq/parser"; import type { ImportDeclaration, ImportSpecifier } from "acorn"; import type { Identifier } from "acorn"; import type { NamedImportSpecifier } from "../imports.js"; /** If specifier is an observable: protocol import, resolves it. */ export declare function resolveObservableImport(specifier: string): string; export declare function isObservableImport(node: ImportDeclaration, specifier: string): boolean; /** Note: mutates inputs! */ export declare function renderObservableImport(source: string, node: ImportDeclaration | ImportWithDeclaration, inputs: string[]): string; export declare function toSpecialIdentifier(identifier: Identifier, type: "viewof" | "mutable"): Identifier; export declare function toSpecialImportSpecifier(specifier: ImportSpecifier, type: "viewof" | "mutable"): ImportSpecifier; export declare function isViewImport(node: NamedImportSpecifier): node is ImportSpecifier; export declare function isMutableImport(node: NamedImportSpecifier): node is ImportSpecifier; /** Turns e.g. "viewof$foo" into "viewof foo", and "$$" into "$". */ export declare function dedollar(input: string): string;