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

Make precise what is accepted as an index in, e.g., ignoreList #95

Open
takikawa opened this issue Jun 20, 2024 · 0 comments
Open

Make precise what is accepted as an index in, e.g., ignoreList #95

takikawa opened this issue Jun 20, 2024 · 0 comments

Comments

@takikawa
Copy link
Collaborator

A few different fields are encoded as indices into an array, and it may be worth being precise about what are acceptable values for these indices. For source/name indices, since the mappings string already constrains the representation, there's not much more to clarify other than possibly to note that out-of-bounds or negative indices are invalid.

For entries in ignoreList, the spec says it's an index into the source array:

ignoreList an optional list of indices of files that should be considered third party code, such as framework code or bundler-generated code. <...> It refers to the [sources](https://tc39.es/source-map/#sources) array and lists the indices of all the known third-party sources in the source map.

To make this more precise, we could add a parenthetical note like

ignoreList an optional list of indices (non-negative integers) of files <...>

to rule out indices like "1" or 1.5 etc.

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

1 participant