import { Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; import emission , { Emission } from '../shared/emission' ; import { PinLockedError } from './errors/locked.error' ; import { PinLike } from './pin-like' ; import { BasePin } from './base' ; /**
 *
 * Represents [wrap](https://connective.dev/docs/wrap) pins.
 *
 */ class Wrapper extends BasePin { readonly observable : Observable < Emission > ; constructor ( observable ) { super ( ) ; this . observable = observable . pipe ( map ( v => emission ( v ) ) ) ; } connect ( _ ) { throw new PinLockedError ( ) ; } } param observable export function wrap ( observable ) { return new Wrapper ( observable ) ; } export default wrap ;