Skip to content

Add variable name to ReferenceError - #56

Merged
Jarred-Sumner merged 1 commit into
mainfrom
jarred/make-referenceerrror-better
Jun 4, 2024
Merged

Jarred-Sumner merged 1 commit into
mainfrom
jarred/make-referenceerrror-better

Conversation

@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

After:

1 | const fetch = await fetch("https://example.com");
                        ^
ReferenceError: Cannot access 'fetch' before initialization.
      at /Users/jarred/Code/bun/hey.js:1:21

Before:

1 | const fetch = await fetch("https://example.com");
                        ^
ReferenceError: Cannot access uninitialized variable.
      at /Users/jarred/Code/bun/hey.js:1:21

After:

```
ReferenceError: Cannot access 'Bar' before initialization.
```

Before:
```
ReferenceError: Cannot access uninitialized variable.
```
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

Successfully merging this pull request may close these issues.

1 participant