Socket
Socket
Sign inDemoInstall

@effection/subscription

Package Overview
Dependencies
Maintainers
1
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effection/subscription - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

dist/symbol-subscribable.d.ts

6

CHANGELOG.md
# @effection/subscription
## 0.9.0
### Minor Changes
- 786b20e: make the type of SymbolSubscribable global, not just the value
## 0.8.1

@@ -4,0 +10,0 @@

3

dist/index.d.ts
export { Subscription, createSubscription } from './subscription';
export { SymbolSubscribable, SubscriptionSource, forEach, Subscribable } from './subscribable';
export { SymbolSubscribable } from './symbol-subscribable';
export { SubscriptionSource, forEach, Subscribable } from './subscribable';
export { ChainableSubscription } from './chainable-subscription';

@@ -4,0 +5,0 @@ import { Operation } from 'effection';

import { Operation } from 'effection';
import { Subscription, Subscriber } from './subscription';
import { DeepPartial } from './match';
export declare const SymbolSubscribable: unique symbol;
import { SymbolSubscribable } from './symbol-subscribable';
export interface Subscribable<T, TReturn> {

@@ -6,0 +6,0 @@ [SymbolSubscribable](): Operation<Subscription<T, TReturn>>;

@@ -23,2 +23,20 @@ 'use strict';

/**
* Hack Zone!
*
* tl;dr not only the symbol value, but also the symbol type must be
* global.
*
* In order to satisfy TypeScript that the SymbolSubscribable
* represents the same value across different versions of the same
* package, we need to declare a "fake" global variable that does not
* actually exist, but has a theoretical type. Since it is global,
* TypeScript will see it as the same type everywhere, and so we can
* use the `typeof` for the value, as the type of of our local symbol
* subscribable, and TypeScript will think that all of the types are
* the same.
*
* See https://github.com/microsoft/TypeScript/issues/8099#issuecomment-210134773
* for details.
*/
var SymbolSubscribable = /*#__PURE__*/Symbol["for"]('Symbol.subscription');

@@ -25,0 +43,0 @@

@@ -21,2 +21,20 @@ import { resource } from 'effection';

/**
* Hack Zone!
*
* tl;dr not only the symbol value, but also the symbol type must be
* global.
*
* In order to satisfy TypeScript that the SymbolSubscribable
* represents the same value across different versions of the same
* package, we need to declare a "fake" global variable that does not
* actually exist, but has a theoretical type. Since it is global,
* TypeScript will see it as the same type everywhere, and so we can
* use the `typeof` for the value, as the type of of our local symbol
* subscribable, and TypeScript will think that all of the types are
* the same.
*
* See https://github.com/microsoft/TypeScript/issues/8099#issuecomment-210134773
* for details.
*/
var SymbolSubscribable = /*#__PURE__*/Symbol["for"]('Symbol.subscription');

@@ -23,0 +41,0 @@

{
"name": "@effection/subscription",
"version": "0.8.1",
"version": "0.9.0",
"description": "Effection Subscriptions",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

export { Subscription, createSubscription } from './subscription';
export { SymbolSubscribable, SubscriptionSource, forEach, Subscribable } from './subscribable';
export { SymbolSubscribable } from './symbol-subscribable';
export { SubscriptionSource, forEach, Subscribable } from './subscribable';
export { ChainableSubscription } from './chainable-subscription';

@@ -4,0 +5,0 @@

import { Operation } from 'effection';
import { Subscription, createSubscription, Subscriber } from './subscription';
import { DeepPartial, matcher } from './match';
import { SymbolSubscribable } from './symbol-subscribable';
export const SymbolSubscribable: unique symbol = Symbol.for('Symbol.subscription');
export interface Subscribable<T,TReturn> {

@@ -8,0 +7,0 @@ [SymbolSubscribable](): Operation<Subscription<T,TReturn>>;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc