difftreelog
test evm token properties
in: master
3 files changed
tests/src/eth/collectionProperties.test.tsdiffbeforeafterbothno syntactic changes
tests/src/eth/tokenProperties.test.tsdiffbeforeafterbothno changes
tests/src/eth/util/helpers.tsdiffbeforeafterboth323 return before - after;323 return before - after;324}324}325325326type ElementOf<A> = A extends readonly (infer T)[] ? T : never;327// I want a fancier api, not a memory efficiency328export function* cartesian<T extends Array<Array<any>>, R extends Array<any>>(internalRest: [...R], ...args: [...T]): Generator<[...R, ...{[K in keyof T]: ElementOf<T[K]>}]> {329 if(args.length === 0) {330 yield internalRest as any;331 return;332 }333 for(const value of args[0]) {334 yield* cartesian([...internalRest, value], ...args.slice(1)) as any;335 }336}