UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

17 lines (16 loc) 535 B
import { Picker } from 'alinea/core'; import { Reference } from 'alinea/core/Reference'; import { Type } from 'alinea/core/Type'; export interface UrlReference extends Reference { ref: 'url'; url: string; title: string; target: string; } export declare namespace UrlReference { function isUrl(value: any): value is UrlReference; } export interface UrlPickerOptions<T> { fields?: Type<T>; } export declare function urlPicker<Fields>(options: UrlPickerOptions<Fields>): Picker<UrlReference & Type.Infer<Fields>>;