BCF.js icon indicating copy to clipboard operation
BCF.js copied to clipboard

The data returned by getHeaderFiles does not matche the return type

Open wlinna opened this issue 3 months ago • 1 comments

According to the return type of getHeaderFiles here , the function should return IFile[] | undefined. However, based on my debugging, it actually returns { file: IFile }[] | undefined which will result in runtime errors in library user's code.

As a workaround, I have to run

markup.header.files = (markup.header.files).map((f: any) => f.file); for each markup to get the expected behavior.

wlinna avatar Sep 11 '25 11:09 wlinna

Yeah I've noticed types are wrong in a few places. I ended up patching all the ones I ran into locally. If I have some time I'll try and put up a PR for this.

janglad avatar Sep 30 '25 08:09 janglad