Skip to content

Commit

Permalink
Move isPending to houdini core (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlecAivazis committed May 18, 2023
1 parent f5af871 commit d7df9ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/houdini-react/src/runtime/routing/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './components'
export { suspense_cache } from './lib/cache'
export type { RouterManifest, RouterPageManifest } from './lib/types'
export { isPending } from './lib/is_pending'
5 changes: 0 additions & 5 deletions packages/houdini-react/src/runtime/routing/lib/is_pending.tsx

This file was deleted.

5 changes: 5 additions & 0 deletions packages/houdini/src/runtime/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ interface VariableNode {
readonly kind: 'Variable'
readonly name: NameNode
}

export const PendingValue = Symbol('houdini_loading')

export type LoadingType = typeof PendingValue

export function isPending(value: any): value is LoadingType {
return typeof value === 'symbol'
}

0 comments on commit d7df9ca

Please sign in to comment.