(
subscription: {
readonly key: string
readonly name: string
readonly deps: ReadonlyArray<Subscription.Dep> | undefined
}
)
| 1815 | |
| 1816 | // JSON has no `-0`, and `structural` has the placeholder for a number that isn't finite. |
| 1817 | const encodeSubscription = ( |
| 1818 | subscription: { |
| 1819 | readonly key: string |
| 1820 | readonly name: string |
| 1821 | readonly deps: ReadonlyArray<Subscription.Dep> | undefined |
| 1822 | } |
| 1823 | ) => ({ |
| 1824 | key: subscription.key, |
| 1825 | name: subscription.name, |
| 1826 | deps: subscription.deps === undefined |
| 1827 | ? null |
| 1828 | : subscription.deps.map((dep) => dep === 0 ? 0 : structural(dep)) |
| 1829 | }) |
| 1830 | |
| 1831 | const encodeSource = (source: Source): typeof SourceWire.Type => { |
| 1832 | switch (source._tag) { |
no test coverage detected