Skip to content

Commit

Permalink
Add export of Location type
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Feb 7, 2023
1 parent 20a0212 commit de2ad12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/**
* @typedef {import('./lib/index.js').Location} Location
*/

export {location} from './lib/index.js'
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* Offset or `-1` for invalid or out of bounds input.
*
* @typedef Location
* Index with accessors.
* Accessors for index.
* @property {ToPoint} toPoint
* Get a line/column-based `point` from `offset`.
* @property {ToOffset} toOffset
Expand All @@ -51,6 +51,7 @@
* @param {VFile | Value} file
* File to index.
* @returns {Location}
* Accessors for index.
*/
export function location(file) {
const value = String(file)
Expand Down

0 comments on commit de2ad12

Please sign in to comment.