rx-singleassignmentsubscription

    1.0.1 • Public • Published

    rx-singleassignmentdisposable

    The Reactive Extensions for JavaScript (RxJS) Single Assignment Subscription object.

    Represents a subscription resource which only allows a single assignment of its underlying subscription resource. If an underlying subscription resource has already been set, future attempts to set the underlying subscription resource will throw an Error.

    Documentation

    SingleAssignment Subscription Members


    SingleAssignmentSubscription

    # [Ⓣ][1]

    Creates a new instance of the SingleAssignmentSubscription class.

    Example

    var Subscription = require('rx-subscription');
    var SingleAssignmentSubscription = require('rx-singleassignmentsubscription');
     
    // Create the instance
    var subscription = new SingleAssignmentSubscription();
     
    // Set the subscription
    susbcription.subscription = Subscription.empty;
     
    // Unsubscribe
    subscription.unsubscribe();

    SingleAssignmentSubscription.prototype.subscription

    # [Ⓣ][1]

    Gets or sets the underlying subscription. After disposal, the result of getting this property is undefined. An error is thrown if the SingleAssignmentSubscription has already been assigned to.

    Arguments

    1. newValue (Subscription): The new subscription value.

    Returns

    (Subscription): The underlying Subscription.

    Example

    var Subscription = require('rx-subscription');
    var SingleAssignmentSubscription = require('rx-singleassignmentsubscription');
     
    // Create the instance
    var subscription = new SingleAssignmentSubscription();
     
    // Set the subscription
    susbcription.subscription = Subscription.empty;
     
    // Get the subscription
    var sub = subscription.subscription;
     
    // Unsubscribe
    subscription.unsubscribe();

    SingleAssignmentSubscription.prototype.unsubscribe()

    # [Ⓣ][1]

    Unsubscribes from the underlying subscription.

    Example

    var Subscription = require('rx-subscription');
    var SingleAssignmentSubscription = require('rx-singleassignmentsubscription');
     
    // Create the instance
    var subscription = new SingleAssignmentSubscription();
     
    // Set the subscription
    susbcription.subscription = Subscription.empty;
     
    // Get the subscription
    var sub = subscription.subscription;
     
    // Unsubscribe
    subscription.unsubscribe();

    Installation

    Using npm:

    npm rx-singleassignmentdisposable

    License

    Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

    Install

    npm i rx-singleassignmentsubscription

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    none

    Last publish

    Collaborators

    • mattpodwysocki