index.d.ts 686 B

12345678910111213141516171819202122
  1. /**
  2. * @import {VFile, Value} from 'vfile'
  3. * @import {Location} from 'vfile-location'
  4. */
  5. /**
  6. * Create an index of the given document to translate between line/column and
  7. * offset based positional info.
  8. *
  9. * Also implemented in Rust in [`wooorm/markdown-rs`][markdown-rs].
  10. *
  11. * [markdown-rs]: https://github.com/wooorm/markdown-rs/blob/main/src/util/location.rs
  12. *
  13. * @param {VFile | Value} file
  14. * File to index.
  15. * @returns {Location}
  16. * Accessors for index.
  17. */
  18. export function location(file: VFile | Value): Location;
  19. import type { VFile } from 'vfile';
  20. import type { Value } from 'vfile';
  21. import type { Location } from 'vfile-location';
  22. //# sourceMappingURL=index.d.ts.map