Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getLineAndColumn is missing from the TypeScript types #410

Closed
millergarym opened this issue Dec 12, 2022 · 2 comments
Closed

getLineAndColumn is missing from the TypeScript types #410

millergarym opened this issue Dec 12, 2022 · 2 comments

Comments

@millergarym
Copy link

@pdubroy

There are other missing methods and type in the generated index.d.ts file.

  /**
  * Returns contextual information (line and column number, etc.) about a
  * specific character in a string.
  */
getLineAndColumn(): LineAndColumnInfo;

and

export interface LineAndColumnInfo {
  offset: number;
  lineNumber: number;
  colNum: number;
  line: string;
  prevLine: string;
  nextLine: string;
  toString(...ranges: number[][]): string;
}
@millergarym
Copy link
Author

With match failures is it possible to get hold of the interval?

@pdubroy
Copy link
Contributor

pdubroy commented Dec 19, 2022

Thanks for filing this issue. This is now fixed on master — I've also added MatchResult.getInterval() to the typings.

I'll push a minor release for this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants