Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I didn't add any automated test, but I checked that after running
pnpm build
, there was no mention ofWindow
in theindex.d.ts
file:I didn't add any test because:
pnpm build
Response
is used so we cannot use that, and other may be used in the future. So I don't know which test we could write that could be future proof for this.fetch
type is getting modified by shiki #454I couldn't use just
declare var fetch
and others, because we need to add to the global scopeWindow
and others as they are used by shiki's node_modules (and so when running tests locally, we need them, see https://github.com/shikijs/shiki/actions/runs/4572982584/jobs/8072860830).So I moved those to a
global.d.ts
so that they'd be present in the project, but not in the built code.