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

More explicit documentation about 0 vs 1 based lines #27

Open
benmccann opened this issue Apr 12, 2023 · 2 comments
Open

More explicit documentation about 0 vs 1 based lines #27

benmccann opened this issue Apr 12, 2023 · 2 comments

Comments

@benmccann
Copy link

It's unclear to me when it says originalPositionFor uses 1-based lines if that's referring only to the input or to the output as well.

It might be nice to add a code comment to each occurrence of line in types.ts, which indicates whether it's a 1-based line or 0-based line.

@dummdidumm
Copy link

Judging from the "drop in replacement for source-map" statement it should be 1-based as the corresponding method is 1-based

@jridgewell
Copy link
Owner

jridgewell commented Jun 21, 2023

Both the inputs and outputs are 1-based, except for traceSegment which uses 0-based for input/output. If you want open a PR, I'm happy to accept it.

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

3 participants