Skip to main content

stringifyLocationRef()

Home > @backstage/catalog-model > stringifyLocationRef

Turns a location ref into its string form.

Signature:

function stringifyLocationRef(ref: {
type: string;
target: string;
}): string;

Parameters

Parameter

Type

Description

ref

{ type: string; target: string; }

A location ref, e.g. { type: 'url', target: 'https://host' }

**Returns:**

string

A string-form location ref, e.g. 'url:https://host'