Unify Derivation and Prism 13/13
This commit is contained in:
parent
d9644f2370
commit
d2876a7c9a
12 changed files with 24 additions and 24 deletions
|
@ -1,15 +1,15 @@
|
||||||
import get from 'lodash-es/get'
|
import get from 'lodash-es/get'
|
||||||
import isPlainObject from 'lodash-es/isPlainObject'
|
import isPlainObject from 'lodash-es/isPlainObject'
|
||||||
import last from 'lodash-es/last'
|
import last from 'lodash-es/last'
|
||||||
import type {Prism} from './prisms/Interface'
|
import type {Prism} from './prism/Interface'
|
||||||
import {isPrism} from './prisms/Interface'
|
import {isPrism} from './prism/Interface'
|
||||||
import type {Pointer, PointerType} from './pointer'
|
import type {Pointer, PointerType} from './pointer'
|
||||||
import {isPointer} from './pointer'
|
import {isPointer} from './pointer'
|
||||||
import pointer, {getPointerMeta} from './pointer'
|
import pointer, {getPointerMeta} from './pointer'
|
||||||
import type {$FixMe, $IntentionalAny} from './types'
|
import type {$FixMe, $IntentionalAny} from './types'
|
||||||
import type {PathBasedReducer} from './utils/PathBasedReducer'
|
import type {PathBasedReducer} from './utils/PathBasedReducer'
|
||||||
import updateDeep from './utils/updateDeep'
|
import updateDeep from './utils/updateDeep'
|
||||||
import prism from './prisms/prism/prism'
|
import prism from './prism/prism'
|
||||||
|
|
||||||
type Listener = (newVal: unknown) => void
|
type Listener = (newVal: unknown) => void
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import type {Prism} from './prisms/Interface'
|
import type {Prism} from './prism/Interface'
|
||||||
import prism from './prisms/prism/prism'
|
import prism from './prism/prism'
|
||||||
import Emitter from './utils/Emitter'
|
import Emitter from './utils/Emitter'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@ import pointer from './pointer'
|
||||||
import type {IBox} from './Box'
|
import type {IBox} from './Box'
|
||||||
import Box from './Box'
|
import Box from './Box'
|
||||||
import type {$FixMe, $IntentionalAny} from './types'
|
import type {$FixMe, $IntentionalAny} from './types'
|
||||||
import prism from './prisms/prism/prism'
|
import prism from './prism/prism'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows creating pointer-prisms where the pointer can be switched out.
|
* Allows creating pointer-prisms where the pointer can be switched out.
|
||||||
|
|
|
@ -8,11 +8,11 @@ export type {IdentityPrismProvider} from './Atom'
|
||||||
export {default as Atom, val, pointerToPrism} from './Atom'
|
export {default as Atom, val, pointerToPrism} from './Atom'
|
||||||
export {default as Box} from './Box'
|
export {default as Box} from './Box'
|
||||||
export type {IBox} from './Box'
|
export type {IBox} from './Box'
|
||||||
export {isPrism} from './prisms/Interface'
|
export {isPrism} from './prism/Interface'
|
||||||
export type {Prism} from './prisms/Interface'
|
export type {Prism} from './prism/Interface'
|
||||||
export {default as iterateAndCountTicks} from './prisms/iterateAndCountTicks'
|
export {default as iterateAndCountTicks} from './prism/iterateAndCountTicks'
|
||||||
export {default as iterateOver} from './prisms/iterateOver'
|
export {default as iterateOver} from './prism/iterateOver'
|
||||||
export {default as prism} from './prisms/prism/prism'
|
export {default as prism} from './prism/prism'
|
||||||
export {default as pointer, getPointerParts, isPointer} from './pointer'
|
export {default as pointer, getPointerParts, isPointer} from './pointer'
|
||||||
export type {Pointer, PointerType} from './pointer'
|
export type {Pointer, PointerType} from './pointer'
|
||||||
export {default as Ticker} from './Ticker'
|
export {default as Ticker} from './Ticker'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @jest-environment jsdom
|
* @jest-environment jsdom
|
||||||
*/
|
*/
|
||||||
import Atom, {val} from './Atom'
|
import Atom, {val} from './Atom'
|
||||||
import prism from './prisms/prism/prism'
|
import prism from './prism/prism'
|
||||||
import Ticker from './Ticker'
|
import Ticker from './Ticker'
|
||||||
|
|
||||||
describe(`v2 atom`, () => {
|
describe(`v2 atom`, () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import type {$IntentionalAny} from '../../types'
|
import type {$IntentionalAny} from '../types'
|
||||||
import Stack from '../../utils/Stack'
|
import Stack from '../utils/Stack'
|
||||||
import type {Prism} from '../Interface'
|
import type {Prism} from './Interface'
|
||||||
|
|
||||||
function createMechanism() {
|
function createMechanism() {
|
||||||
const noop = () => {}
|
const noop = () => {}
|
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* @jest-environment jsdom
|
* @jest-environment jsdom
|
||||||
*/
|
*/
|
||||||
import Atom, {val} from '../../Atom'
|
import Atom, {val} from '../Atom'
|
||||||
import Ticker from '../../Ticker'
|
import Ticker from '../Ticker'
|
||||||
import type {$FixMe, $IntentionalAny} from '../../types'
|
import type {$FixMe, $IntentionalAny} from '../types'
|
||||||
import iterateAndCountTicks from '../iterateAndCountTicks'
|
import iterateAndCountTicks from './iterateAndCountTicks'
|
||||||
import prism from './prism'
|
import prism from './prism'
|
||||||
|
|
||||||
describe('prism', () => {
|
describe('prism', () => {
|
|
@ -1,8 +1,8 @@
|
||||||
import type Ticker from '../../Ticker'
|
import type Ticker from '../Ticker'
|
||||||
import type {$IntentionalAny, VoidFn} from '../../types'
|
import type {$IntentionalAny, VoidFn} from '../types'
|
||||||
import Stack from '../../utils/Stack'
|
import Stack from '../utils/Stack'
|
||||||
import type {Prism} from '../Interface'
|
import type {Prism} from './Interface'
|
||||||
import {isPrism} from '../Interface'
|
import {isPrism} from './Interface'
|
||||||
import {
|
import {
|
||||||
startIgnoringDependencies,
|
startIgnoringDependencies,
|
||||||
stopIgnoringDependencies,
|
stopIgnoringDependencies,
|
Loading…
Reference in a new issue