-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add declarationDir option #7170
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
Conversation
export function getDeclarationEmitOutputFilePath(sourceFile: SourceFile, host: EmitHost) { | ||
const options = host.getCompilerOptions(); | ||
const outputDir = options.declarationDir || options.outDir; // Prefer declaration folder if specified | ||
return options.declaration ? removeFileExtension( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turn this into an if
and add a newline above.
We have a function |
@DanielRosenwasser Ok, done. I should mention that I wasn't sure what the expected behavior for
Let me know if either of those are what's needed. |
d1d6169
to
75a70d9
Compare
I think that if |
@@ -107,7 +107,7 @@ namespace Harness.LanguageService { | |||
} | |||
} | |||
|
|||
class DefaultHostCancellationToken implements ts.HostCancellationToken { | |||
export class DefaultHostCancellationToken implements ts.HostCancellationToken { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need these exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't reproduce this anymore, but I was getting compile errors concerning the visibility of these classes. I might have brainfarted and forgot to jake local
before jake tests
. I'll pull this commit out.
75a70d9
to
05e1a32
Compare
Okay, I've pulled out the test harness changes and made specifying |
Lint PR #7202 going to wait for CI to pass :) |
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "declarationDir", "declaration")); | ||
} | ||
if (options.out || options.outFile) { | ||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declarationDir", options.out ? "out" : options.outFile)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"outFile"
instead of options.outFile
one small typo. other than that LGTM |
05e1a32
to
f251768
Compare
@mhegazy Whoops. Fixed |
Thanks! |
Fixes #6723.