// Copyright 2017-2025 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 import { lazyMethod, lazyMethods } from '@polkadot/util'; type LazySection = Record; type LazyRecord = Record>; export function lazyDeriveSection (result: LazyRecord, section: string, getKeys: (s: string) => string[], creator: (s: string, m: string) => T): void { lazyMethod(result, section, () => lazyMethods({}, getKeys(section), (method: string) => creator(section, method) ) ); }