@ngx-playwright/test
Version:
23 lines • 1.32 kB
TypeScript
/**
* Get the names of all destructured properties from the first parameter in the given function
*
* This uses a quick and dirty "parser" rather than a fully fledged ES-compatible parser, because
* that's overkill when only parsing a function (which we already know is valid because we pass in
* the parsed and instantiated function)
*
* @param {Function} fn The function to inspect
* @returns {string[] | null} The destructured properties of the first parameter of the given function, null if not destructured
*/
export function getDestructuredArguments(fn: Function): string[] | null;
/**
* Get the names of all destructured properties used on the $ property of the first destructured argument in the given function
*
* This uses a quick and dirty "parser" rather than a fully fledged ES-compatible parser, because
* that's overkill when only parsing a function (which we already know is valid because we pass in
* the parsed and instantiated function)
*
* @param {Function} fn The function to inspect
* @returns {string[] | null} The destructured properties of the $ property of the first destructured argument in the given function, or null if either is not destructured
*/
export function getDestructured$Argument(fn: Function): string[] | null;
//# sourceMappingURL=../src/parse-arguments.d.ts.map