Skip to content

Refactor inspector code to pass strict-null checks#250

Merged
petebacondarwin merged 1 commit intocloudflare:mainfrom
petebacondarwin:strict-null-checks-inspector
Jan 18, 2022
Merged

Refactor inspector code to pass strict-null checks#250
petebacondarwin merged 1 commit intocloudflare:mainfrom
petebacondarwin:strict-null-checks-inspector

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

Some simple strict-null fixes but also a refactor to use react memo hooks in inspector code.

Previously the proxy server and websocket server were created in ref hooks.
But this prevented TypeScript from understanding that they were always defined when needed.
By using memo hooks we get this typing for free; and also can lean on react to handle recreating them as needed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 15, 2022

🦋 Changeset detected

Latest commit: 124ee86

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

@threepointone threepointone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the useMemo usage.

Comment thread packages/wrangler/src/inspect.ts Outdated
Comment thread packages/wrangler/src/inspect.ts Outdated
Comment thread packages/wrangler/src/inspect.ts Outdated
@petebacondarwin petebacondarwin force-pushed the strict-null-checks-inspector branch from 8a8f3f9 to 124ee86 Compare January 18, 2022 14:40
@petebacondarwin petebacondarwin merged commit 3c74a4a into cloudflare:main Jan 18, 2022
@petebacondarwin petebacondarwin deleted the strict-null-checks-inspector branch January 18, 2022 14:42
@github-actions github-actions bot mentioned this pull request Jan 18, 2022
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

3 participants