[cli][client][error-utils][frameworks][fs-detectors][hydrogen][next][node-bridge][node][redwood][remix][routing-utils][static-config] update @types/node to v14 across repo (#8842)

### Related Issues

Updates @types/node to the latest version within the v14 major (based on `npm view @types/node`)

```
❯ npm view @types/node@'>=14.0.0 <15.0.0' version | tail -1
@types/node@14.18.33 '14.18.33'
```

This PR also fixes the various necessary type changes

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
This commit is contained in:
Ethan Arrowood
2022-11-04 14:21:13 -06:00
committed by GitHub
parent 9e5f17b3c6
commit 253b4fd1d2
22 changed files with 52 additions and 69 deletions

View File

@@ -4,7 +4,7 @@
* @param querystring - The querystring to parse, also known as the "search" string.
*/
export function parseQueryString(
querystring?: string
querystring?: string | null
): Record<string, string[]> {
const query: Record<string, string[]> = Object.create(null);
if (!querystring || !querystring.startsWith('?') || querystring === '?') {
@@ -38,9 +38,9 @@ export function parseQueryString(
*/
export function formatQueryString(
query: Record<string, string[]> | undefined
): string | undefined {
): string | null {
if (!query) {
return undefined;
return null;
}
let s = '';
let prefix = '?';
@@ -55,5 +55,5 @@ export function formatQueryString(
prefix = '&';
}
}
return s || undefined;
return s || null;
}