Skip to main content
Version: Next

@backstage/types

Home > @backstage/types

Common TypeScript types used within Backstage

Functions

Function

Description

createDeferred()

Creates a deferred promise that can be resolved or rejected later.

durationToMilliseconds(duration)

Converts a HumanDuration to milliseconds.

Interfaces

Interface

Description

JsonArray

A type representing all allowed JSON array values.

Type Aliases

Type Alias

Description

DeferredPromise

A deferred promise that can be resolved or rejected later.

HumanDuration

Human friendly durations object.

JsonObject

A type representing all allowed JSON object values.

JsonPrimitive

A type representing all allowed JSON primitive values.

JsonValue

A type representing all allowed JSON values.

Observable

Observable sequence of values and errors, see TC39.

https://github.com/tc39/proposal-observable

This is used as a common return type for observable values and can be created using many different observable implementations, such as zen-observable or RxJS 5.

Observer

Observer interface for consuming an Observer, see TC39.

Subscription

Subscription returned when subscribing to an Observable, see TC39.