Function isMinimalWritableStore

  • Provides a basic test for a given variable to test if it has the shape of a minimal writable store by having a subscribe and set functions.

    Note: functions are also objects, so test that the variable might be a function w/ subscribe & set functions.

    Type Parameters

    • T

      type of data.

    Parameters

    • store: unknown

      variable to test that might be a store.

    Returns store is MinimalWritable<T>

    Whether the variable tested has the shape of a MinimalWritable store.