Skip to content

Commit

Permalink
fix: fix type check
Browse files Browse the repository at this point in the history
  • Loading branch information
pionxzh committed Mar 19, 2023
1 parent 3ada1d9 commit bf5a86e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/stores/JsonViewerStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export const createJsonViewerStore = <T = unknown> (props: JsonViewerProps<T>) =
}))
}

export const JsonViewerStoreContext = createContext<StoreApi<JsonViewerState>>(undefined)
// why as any? See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
export const JsonViewerStoreContext = createContext<StoreApi<JsonViewerState>>(undefined as any)

export const JsonViewerProvider = JsonViewerStoreContext.Provider

Expand Down
3 changes: 2 additions & 1 deletion src/stores/typeRegistry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export const createTypeRegistryStore = () => {
}))
}

export const TypeRegistryStoreContext = createContext<StoreApi<TypeRegistryState>>(undefined)
// why as any? See https://github.com/DefinitelyTyped/DefinitelyTyped/pull/24509#issuecomment-382213106
export const TypeRegistryStoreContext = createContext<StoreApi<TypeRegistryState>>(undefined as any)

export const TypeRegistryProvider = TypeRegistryStoreContext.Provider

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"moduleResolution": "node",
"isolatedModules": true,
"esModuleInterop": true,
"skipLibCheck": true,
"declaration": true,
"sourceMap": true,
"strict": true
Expand Down

0 comments on commit bf5a86e

Please sign in to comment.