docs: Fix typescript errors in search components #2500
Draft
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.
Describe the PR
This is the last set of typescript errors in docs. Once this and the other PRs in flight are merged, I'll push a change to add type-check to the main build, which should prevent new errors from being checked in.
I went down a bunch of paths to try to suppress these errors, since they aren't ours. However, it appears that the typescript team is opposed to suppressing errors in the dependency tree (you can exclude top-level files, but not things that are included by a file that you're checking. See microsoft/TypeScript#40426 for info.
I've opened a feature request on VitePress to see if they have other ideas on how to include their search control in a custom theme vuejs/vitepress#4476 - but I'd like to get type checking turned on sooner then they're likely to react.
The other possibility is to rework our theme to be an extended default theme so that we can use their Layout component. But that seems like it would be a mess, and one of the nice things about our doc site as it stands is that we're using BSVN for most of the styling which I'm not sure we could do if we went down this route.
Small replication
pnpm type-check
PR checklist
What kind of change does this PR introduce? (check at least one)
fix(...)
feat(...)
fix(...)
docs(...)
The PR fulfills these requirements:
CHANGELOG
is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied