main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
964 bytes
|
Rev | Line | |
---|
[d24f17c] | 1 | import type { Node } from '../nodes/Node.js';
|
---|
| 2 | import type { Document } from './Document.js';
|
---|
| 3 | /**
|
---|
| 4 | * Verify that the input string is a valid anchor.
|
---|
| 5 | *
|
---|
| 6 | * Will throw on errors.
|
---|
| 7 | */
|
---|
| 8 | export declare function anchorIsValid(anchor: string): true;
|
---|
| 9 | export declare function anchorNames(root: Document<Node, boolean> | Node): Set<string>;
|
---|
| 10 | /** Find a new anchor name with the given `prefix` and a one-indexed suffix. */
|
---|
| 11 | export declare function findNewAnchor(prefix: string, exclude: Set<string>): string;
|
---|
| 12 | export declare function createNodeAnchors(doc: Document<Node, boolean>, prefix: string): {
|
---|
| 13 | onAnchor: (source: unknown) => string;
|
---|
| 14 | /**
|
---|
| 15 | * With circular references, the source node is only resolved after all
|
---|
| 16 | * of its child nodes are. This is why anchors are set only after all of
|
---|
| 17 | * the nodes have been created.
|
---|
| 18 | */
|
---|
| 19 | setAnchors: () => void;
|
---|
| 20 | sourceObjects: Map<unknown, {
|
---|
| 21 | anchor: string | null;
|
---|
| 22 | node: Node | null;
|
---|
| 23 | }>;
|
---|
| 24 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.