Closed Ionaru closed 3 years ago
Thanks for the very detailed report! Tbh I'm not sure why I set this up to use gulp-typescript in the first place, most of my newer projects use gulp but use the TS compiler directly, or, for ones that are this simple, they have npm scripts that just use tsc. I'll switch to the latter for this project.
As for the rest of this, I'll investigate all of this in further detail later tonight or tomorrow. Should hopefully have this all resolved then 😅
It looks like your errors are because my tsconfig.json
didn't have strict
on (because I was dumb when I set this up, I guess) so I fixed that, among other updates:
Should have the fixes released shortly, just writing up a changelog now ✨
I can confirm the new version has fixed the build problems I was experiencing! Thank you for the blazingly fast reply and fix! 🚀
Summary A number of declaration files in the scryfall-sdk package contain errors, resulting in build errors on my end.
Details When using scryfall-sdk in my typescript project, I noticed that errors would pop up when building:
I checked out this repo and looked at the files and the way they are created. Running![image](https://user-images.githubusercontent.com/3472373/102791231-f8a30f00-43a6-11eb-93d0-55f955ef931d.png)
gulp build
finished without error, but theCards.d.ts
file it created does contain the errors I noticed in my build.It looks like your 'gulp build' step is somehow not giving you the feedback that the regular typescript compiler does. With a small change to your tsconfig:
Specifically the
noEmitOnError
,outDir
andfiles
fields, I was able to run the typescript compiler directly, without gulp. Output ofnpx tsc
:The first 7 errors are the same as the ones I got in my build, which was to be expected. The last 3 errors are very surprising to me, they seem to indicate actual problems with the build and I don't know why gulp has let those slip through.
Possible solutions on your end
Workarounds on my end
skipLibCheck
to the tsconfig.Further notes I would be happy to help develop a solution for this, but changing of replacing the build system is not something I am comfortable doing without approval of the maintainers.
Possibly related to (or regression of) #11 ?