INNER CODE UNIT · TypeScript
getPathState
margelo/react-native-runtimes · packages/state/src/index.ts:453
function getPathState<TValue>(path: SharedStorePath): TValue {
return getValueAtSegments(currentState, normalizePath(path)) as TValue;
}
function patchSubtree<K extends SharedStoreSubtreeKey<TState>>(
subtreeKey: K,
subtreeState: TState[K],
): TState {
return patchPath(subtreeKey, subtreeState);
}
function initialSubtree<K extends SharedStoreSubtreeKey<TState>>(
subtreeKey: K,
): TState[K] {
return initialPathValue(subtreeKey);
}
function initialJsonForSubtree(subtreeKey: string): string {