# Wijmo_Viewer.Ipromise

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								IPromise Interface
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>Defines the interface of promise which is used for asynchronous calling.</p>
								</div>
							</div>
						</section>
						<section class="tsd-hierarchy">
							<h3>Heirarchy</h3>
							<ul class="tsd-hierarchy">
								<li>
									<span class="target">IPromise</span>
								</li>
							</ul>
						</section>
						<section class="tsd-index-group">
							<section class="tsd-index-panel">
								<div class="tsd-index-content">
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Methods
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-method tsd-parent-kind-interface"><a href="wijmo_viewer.ipromise.html#catch" class="tsd-kind-icon">catch</a></li>
											<li class="tsd-kind-method tsd-parent-kind-interface"><a href="wijmo_viewer.ipromise.html#then" class="tsd-kind-icon">then</a></li>
										</ul>
									</section>
								</div>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Methods</h2>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
								<a name="catch" class="tsd-anchor"></a>
								<h3>catch</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
									<li class="tsd-signature tsd-kind-icon">catch<span class="tsd-signature-symbol">(</span>onRejected<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="wijmo_viewer.ipromise.html" class="tsd-signature-type">IPromise</a></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Call the function after a promise is rejected.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>onRejected: <span class="tsd-signature-type">Object</span></h5>
												<div class="tsd-comment">
													<p>The function which will be executed when a promise is rejected.
														This has a single parameter, the rejection reason. The return value will be
													passed to the next callback function.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <a href="wijmo_viewer.ipromise.html" class="tsd-signature-type">IPromise</a></h4>
										<p>An IPromise equivalent to the value returned by onFulfilled/onRejected after being passed.</p>
									</li>
								</ul>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
								<a name="then" class="tsd-anchor"></a>
								<h3>then</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
									<li class="tsd-signature tsd-kind-icon">then<span class="tsd-signature-symbol">(</span>onFulfilled<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Object</span>, onRejected<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Object</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="wijmo_viewer.ipromise.html" class="tsd-signature-type">IPromise</a></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Call the function after a promise is fulfilled or rejected.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5><span class="tsd-flag ts-flagOptional">Optional</span> onFulfilled: <span class="tsd-signature-type">Object</span></h5>
												<div class="tsd-comment">
													<p>The function which will be executed when a promise is fulfilled.
														This has a single parameter, the fulfillment value. If a value is returned, it will be
													passed to the next callback function. If no value is returned, the original value will be passed.</p>
												</div>
											</li>
											<li>
												<h5><span class="tsd-flag ts-flagOptional">Optional</span> onRejected: <span class="tsd-signature-type">Object</span></h5>
												<div class="tsd-comment">
													<p>The function which will be executed when a promise is rejected.
														This has a single parameter, the rejection reason. If a value is returned, it will be
													passed to the next callback function. If no value is returned, the original value will be passed.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <a href="wijmo_viewer.ipromise.html" class="tsd-signature-type">IPromise</a></h4>
										<p>An IPromise equivalent to the value you return from onFulfilled/onRejected after being passed.</p>
									</li>
								</ul>
							</section>
						</section>
					</div>