Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

IStoreInvalidator

IStoreInvalidator<T>: function

Type parameters

  • T

Type declaration

    • (value?: T): void
    • Parameters

      • Optional value: T

      Returns void

IStoreStartStopNotifier

IStoreStartStopNotifier<T>: function

Type parameters

  • T

Type declaration

IStoreSubscriber

IStoreSubscriber<T>: function

Type parameters

  • T

Type declaration

    • (value: T): void
    • Parameters

      • value: T

      Returns void

IStoreUnsubscriber

IStoreUnsubscriber: function

Type declaration

    • (): void
    • Returns void

IStoreUpdater

IStoreUpdater<T>: function

Type parameters

  • T

Type declaration

    • (value: T): T
    • Parameters

      • value: T

      Returns T

Functions

is_readable

  • is_readable<T>(value: unknown): value is Readable<T>
  • Returns if the value matches a Readable Svelte Store implementation

    As a minimal example:

    import {readable, writable} from "svelte/store";
    
    import {is_readable} from "svelte-commons/lib/util/shared";
    
    const readable_store = readable("some value");
    const writable_store = writable("some value");
    
    console.log(
        is_readable(readable_store),
        is_readable(writable_store)
    ); // logs: `true`, `true`

    Type parameters

    • T

    Parameters

    • value: unknown

    Returns value is Readable<T>

is_writable

  • is_writable<T>(value: unknown): value is Writable<T>
  • Returns if the value matches a Writable Svelte Store implementation

    As a minimal example:

    import {readable, writable} from "svelte/store";
    
    import {is_writable} from "svelte-commons/lib/util/shared";
    
    const readable_store = readable("some value");
    const writable_store = writable("some value");
    
    console.log(
        is_writable(readable_store),
        is_writable(writable_store)
    ); // logs: `false`, `true`

    Type parameters

    • T

    Parameters

    • value: unknown

    Returns value is Writable<T>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc