Skip to content
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

Define output folder and/or output file for declarations #5793

Closed
NCC1701M opened this issue Nov 25, 2015 · 10 comments
Closed

Define output folder and/or output file for declarations #5793

NCC1701M opened this issue Nov 25, 2015 · 10 comments
Labels
Duplicate An existing issue was already created Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript

Comments

@NCC1701M
Copy link

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.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 26, 2015

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.

@NCC1701M
Copy link
Author

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.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2015

so why not use a build system to manage this for you?

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Dec 1, 2015
@NCC1701M
Copy link
Author

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

@DanielRosenwasser
Copy link
Member

You might want to file a bug on the gulp plugin owner's repo. Was it gulp-typescript?

@NCC1701M
Copy link
Author

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?

@DanielRosenwasser DanielRosenwasser added External Relates to another program, environment, or user action which we cannot control. and removed Needs More Info The issue still hasn't been fully clarified External Relates to another program, environment, or user action which we cannot control. labels Dec 23, 2015
@DanielRosenwasser
Copy link
Member

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.

@DanielRosenwasser DanielRosenwasser added the Suggestion An idea for TypeScript label Dec 23, 2015
@NCC1701M
Copy link
Author

Well I tried setting up the sourcemap url. Didn't work either

@DanielRosenwasser
Copy link
Member

How'd you go about amending the sourcemap url?

@mhegazy mhegazy added the Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. label Jan 5, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Feb 23, 2016

looks like a duplicate of #6723

@mhegazy mhegazy closed this as completed Feb 23, 2016
@mhegazy mhegazy added the Duplicate An existing issue was already created label Feb 23, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created Needs Proposal This issue needs a plan that clarifies the finer details of how it could be implemented. Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants