Rich-Harris / dts-buddy

WORK IN PROGRESS DO NOT USE
MIT License
314 stars 12 forks source link

bug: missing "include" in tsconfig has different default behavior than tsc #47

Closed reconbot closed 1 year ago

reconbot commented 1 year ago

I was moving some code around and broke dts-buddy, it turns out I had removed include in my tsconfig which works a bit differently than dts-buddy exptects. According to my vscode's code highlighting (and what I've seen) include in the tsconfig.json works as follows;

Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.

However if there's a missing include in dts-buddy we do nothing; https://github.com/Rich-Harris/dts-buddy/blob/main/src/utils.js#L91-L102

Rich-Harris commented 1 year ago

thanks!