You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
880 B

{"ast":null,"code":"import { Subject } from './Subject';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nexport class BehaviorSubject extends Subject {\n constructor(_value) {\n super();\n this._value = _value;\n }\n\n get value() {\n return this.getValue();\n }\n\n _subscribe(subscriber) {\n const subscription = super._subscribe(subscriber);\n\n if (subscription && !subscription.closed) {\n subscriber.next(this._value);\n }\n\n return subscription;\n }\n\n getValue() {\n if (this.hasError) {\n throw this.thrownError;\n } else if (this.closed) {\n throw new ObjectUnsubscribedError();\n } else {\n return this._value;\n }\n }\n\n next(value) {\n super.next(this._value = value);\n }\n\n} //# sourceMappingURL=BehaviorSubject.js.map","map":null,"metadata":{},"sourceType":"module"}