Skip to content

Commit

Permalink
fix React types usages
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Dec 7, 2023
1 parent a2ed8c3 commit f170dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telefunc/node/react-streaming/useTelefuncContext.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export { useTelefuncContext }
export { TelefuncSSR }

import { createContext, useContext, createElement } from 'react'
import { createContext, useContext, createElement, type ReactNode } from 'react'
import type { Telefunc } from '../../node/server/getContext/TelefuncNamespace'
import { assertUsage, isObject } from '../utils'

const TelefuncReactContext = createContext<null | Telefunc.Context>(null)

function TelefuncSSR({ context, children }: { context?: Telefunc.Context; children: React.ReactNode }) {
function TelefuncSSR({ context, children }: { context?: Telefunc.Context; children: ReactNode }) {
assertUsage(
context === undefined || isObject(context),
'[<TelefuncSSR context={context}/>] context should be an object'
Expand Down

0 comments on commit f170dc8

Please sign in to comment.