powerpagestoolkit
Version:
Reference, manipulate, and engage with Power Pages sites through the nodes in the DOM; use a variety of custom methods that allow customizing your power pages site quicker and easier.
14 lines (13 loc) • 692 B
TypeScript
/// <reference path="../globals.d.ts" />
import PowerPagesElementArray from "../core/PowerPagesElementArray.d.ts";
import type PowerPagesElement from "../core/PowerPagesElement.d.ts";
/**
*
* @param array An array of PowerPagesElements to be modified with custom methods, as well as a custom getter. Custom getter allows for accessing properties within the array with bracket-style property access. See example
* @example
* ```javascript
* const enhanced = enhanceArray(basicArray)
* const someProp = enhanced['some_prop_logical_name']
* ```
*/
export default function enhanceArray<T extends string>(array: PowerPagesElement[]): PowerPagesElementArray & Record<T, PowerPagesElement>;