Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Oct 9, 2022
1 parent b3a859a commit 53393f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/website/src/components/hooks/useHashState.ts
Expand Up @@ -129,19 +129,19 @@ const retrieveStateFromLocalStorage = (): Partial<ConfigModel> | undefined => {

const state: Partial<ConfigModel> = {};
if (hasOwnProperty('ts', config)) {
const ts: unknown = config.ts;
const ts = config.ts;
if (typeof ts === 'string') {
state.ts = ts;
}
}
if (hasOwnProperty('jsx', config)) {
const jsx: unknown = config.jsx;
const jsx = config.jsx;
if (typeof jsx === 'boolean') {
state.jsx = jsx;
}
}
if (hasOwnProperty('showAST', config)) {
const showAST: unknown = config.showAST;
const showAST = config.showAST;
if (typeof showAST === 'boolean') {
state.showAST = showAST;
} else if (typeof showAST === 'string') {
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/lib/has-own-property.ts
@@ -1,4 +1,4 @@
export function hasOwnProperty<X extends object, Y extends PropertyKey>(
export function hasOwnProperty<Container extends object, Key extends PropertyKey>(
property: Y,
object: X,
): object is X & Record<Y, unknown> {
Expand Down

0 comments on commit 53393f0

Please sign in to comment.