-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Define output folder and/or output file for declarations #5793
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
Comments
We would like to limit the complexity of the number of options allowed by the compiler. Can you elaborate on if/why this is a blocking issue, and if using a build tool like grunt or gulp would address the issue. |
I develop a web site with node.js. IDE is Visual Studio Code. I build and run the server witth Code. At the server I have a data model and I like to use the data model classes or rather their definitions at the client side to. But I don't want to have multiple .d.ts files in the server output folder I need them as a single .d.ts file in the client source folder. I don't want to compile the .ts files twice (once for the server and once for the client) because it would be - in my eyes - an unnecessary step. |
so why not use a build system to manage this for you? |
Tried several things to compile typescript, for example gulp, but I always had problems with the created js files and their sourcemaps especially when I tried to debug. Only when compiling it with Visual Studio Code and tsc I kan debug correctly |
You might want to file a bug on the gulp plugin owner's repo. Was it gulp-typescript? |
Yeah, I will file a bug, but my intention was, the change request, so that .d.ts files can be placed in an other directory, at least, they are some kind of "header files" for your .js-lib. So why should one collect those files "manually" (even with thirdparty tools) when it could be done directly when creating them? |
Actually, you'll need to amend the sourceMap URL for each produced file, so it might not be a bug on their end unless the tool specifically allows you to move produced .d.ts files. |
Well I tried setting up the sourcemap url. Didn't work either |
How'd you go about amending the sourcemap url? |
looks like a duplicate of #6723 |
When using the declaration option the .d.ts files are all generated in the output directory of the .js files. Please provide an option to define the output directory and/or the output file for the declarations.
The text was updated successfully, but these errors were encountered: