import type { Resource } from "./operation" ; import type { FutureLike } from "./future" ; export function isPromise ( value ) { return value && typeof ( value . then ) === 'function' ; } export function isGenerator ( value ) { return value && typeof ( value . next ) === 'function' ; } export function isFuture < T > ( value ) { return value && typeof ( value . consume ) === 'function' ; } export function isResource < TOut > ( value ) { return typeof ( value ) === 'object' && typeof ( value . init ) === 'function' ; }