 TODO: Implement fromDiagram using RxJS in TypeScript language. 
Write only implementation without textual descriptions, without code comments, without imports.
~~~ts
import * from 'rxjs';

export interface FromDiagramOptions {
  values?: Object;
  errorValue?: any;
  timeUnit?: number;
}

interface Notification {
  type: 'next' | 'error' | 'complete';
  value?: any;
  time: number;
}

/**
 * Creates a real stream out of an ASCII drawing of a stream. Each string
 * character represents an amount of time passed (by default, 20 milliseconds).
 * `-` characters represent nothing special, `|` is a symbol to mark the
 * completion of the stream, `#` is an error on the stream, and any other
 * character is a "next" event.
 *
 * Example:
 *
 * ```js
 *
 * const stream = fromDiagram('--a--b---c-d--|')
 *
 * stream.subscribe({
 *   next: (x) => console.log(x),
 *   error: (err) => console.error(err),
 *   complete: () => console.log('concat completed'),
 * })
 * ```
 *
 * The character `a` represent emission of the event `'a'`, a string. If you
 * want to emit something else than a string, you need to provide those values
 * in the options argument.
 *
 * Example:
 *
 * ```js
 *
 * const stream = fromDiagram('--a--b---c-d--|', {
 *   values: {a: 10, b: 20, c: 30, d: 40}
 * })
 *
 * stream.subscribe({
 *   next: (x) => console.log(x),
 *   error: (err) => console.error(err),
 *   complete: () => console.log('concat completed'),
 * })
 * ```
 *
 * That way, the stream will emit the numbers 10, 20, 30, 40. The `options`
 *