[update] enhance wpCompress logging, add rootModule parameter to sliceAndWriteCalls, and improve dependency checks

This commit is contained in:
2025-08-14 21:29:36 +01:00
parent 9dc2e300dc
commit 7f2f0b9240
8 changed files with 86 additions and 21 deletions

View File

@@ -95,7 +95,13 @@ export class LibraryTypesRecorder {
return type.getTupleElements().map(t => this.instantiateFakerOnType(t,level+1));
} else if (type.isArray()) {
return []// TODO - handle arrays;
//also, check if its a buffer from NodeJS
} else if (type.isObject()) {
// TODO check if its a buffer
if (type.getText() === 'Buffer') {
return Buffer.from(simpleFaker.string.alphanumeric(10));
}
const f = type.getCallSignatures();
if(f.length > 0) {
return simpleFaker.helpers.arrayElement(f.map(fn => ()=>this.instantiateFakerOnType(fn.getReturnType(),level+1)));