-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spot doesn't seem to read tsconfig #1109
Comments
Seem to be facing this issue as well and the way I had to fix it was to edit the compiler options directly in https://github.com/mahirk/spot/blob/47bd3ae433deeb3fbc234052ca575dc5d921b0d9/lib/src/parser.ts#L27-L46 Maybe it can either accept:
|
I'm leaning towards allowing an optional option to point to a |
Yeah ok - that makes sense. I kind of forgot that this isn't intended to be integrated into a Typescript project but it only uses a subset of TS 😅 An optional tsconfig pointer would be perfect |
It would be great if we could point to a tsconfig file. I have a custom library with type definitions in my "paths" which I cannot use without pointing to my tsconfig. |
At minima, it would be great to be able to programmatically set our own compilerOptions dictionary. Otherwise, the only option available is to repeat @mahirk and create a custom fork of Spot, which is far from ideal. Any ideas? |
Seems like the actually used tsconfig is hard coded, this is very unfortunate. Shouldn't be to hard to implement a CLI flag to allow users to pass a tsconfig file. I will give it a try. |
Checking in on this as I am just starting out with spot and have encountered this issue. Is this ready for prime-time? |
Describe the bug
It seems as though spot isn't using the local tsconfig.json, or for some other reason isn't loading locally-defined type declarations.
I'm experimenting with spot to generate OpenAPI docs for an existing Typescript project which uses a couple of un-typed javascript dependencies. I've written basic type declarations for them and configured tsconfig.json so that they're discovered.
tsc
has no problems but as soon as I try to import anything from a module that also includes one of these dependencies spot fails with this error.The
api/http
also works withtsc
because of an entry inpaths
but spot isn't recognising itTo Reproduce
Here's a contrived pseudocode example
Expected behavior
Ideally spot would resolve paths and type declarations in the same way that
tsc
doesDesktop (please complete the following information):
The text was updated successfully, but these errors were encountered: