Home / Function/ isPromise() — astro Function Reference

isPromise() — astro Function Reference

Architecture documentation for the isPromise() function in util.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  8e8312b1_4fa3_955e_e734_dc6b443e6ae0["isPromise()"]
  fb795a89_af00_875c_12f7_4096170be542["util.ts"]
  8e8312b1_4fa3_955e_e734_dc6b443e6ae0 -->|defined in| fb795a89_af00_875c_12f7_4096170be542
  style 8e8312b1_4fa3_955e_e734_dc6b443e6ae0 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/util.ts lines 1–5

export function isPromise<T = any>(value: any): value is Promise<T> {
	return (
		!!value && typeof value === 'object' && 'then' in value && typeof value.then === 'function'
	);
}

Domain

Subdomains

Frequently Asked Questions

What does isPromise() do?
isPromise() is a function in the astro codebase, defined in packages/astro/src/runtime/server/util.ts.
Where is isPromise() defined?
isPromise() is defined in packages/astro/src/runtime/server/util.ts at line 1.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free