Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up--emitDeclarationOnly flag to enable declarations only output #20735
Conversation
nojvek
changed the title
Adding noEmitJs flag to enable declarations only output
noEmitJs flag to enable declarations only output
Dec 16, 2017
| if (options.noEmitJs && !options.declaration) { | ||
| programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "noEmitJs", "declaration")); | ||
| } | ||
|
|
This comment has been minimized.
This comment has been minimized.
sheetalkamat
Dec 18, 2017
Member
you would also want to skip verifyEmitFilePath(emitFileNames.jsFilePath, emitFilesSeen); down below when noEmitJs is true
This comment has been minimized.
This comment has been minimized.
|
Kind ping regarding this @sheetalkamat Should I be adding any specific devs from typescript team to this PR? What's the usual process before a PR lands in the repo ? |
| @@ -231,6 +231,13 @@ namespace ts { | |||
| category: Diagnostics.Basic_Options, | |||
| description: Diagnostics.Do_not_emit_outputs, | |||
| }, | |||
| { | |||
| name: "noEmitJs", | |||
This comment has been minimized.
This comment has been minimized.
| name: "noEmitJs", | ||
| type: "boolean", | ||
| showInSimplifiedHelpView: true, | ||
| category: Diagnostics.Basic_Options, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nojvek
Jan 21, 2018
•
Contributor
Advanced_options don't show up as part of --help or in default tsc --init. Doesn't it make sense that the option showed up there? I plan to enable allowJs + emitDeclarationsOnly in another PR which would help with lots of npm projects to auto-generate jsdoc to .d.ts declarations.
Puppeteer is one good example
| @@ -2776,6 +2776,10 @@ | |||
| "category": "Message", | |||
| "code": 6013 | |||
| }, | |||
| "Do not emit js outputs.": { | |||
This comment has been minimized.
This comment has been minimized.
| @@ -980,7 +980,7 @@ namespace ts.server { | |||
| }; | |||
|
|
|||
| const ioSession = new IOSession(options); | |||
| process.on("uncaughtException", err => { | |||
| process.on("uncaughtException", (err: any) => { | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
nojvek
Jan 5, 2018
Contributor
Because it was failing compilation when doing a “gulp build” with an error.
This comment has been minimized.
This comment has been minimized.
added a commit
to kevlened/str2buf
that referenced
this pull request
Jan 6, 2018
This comment has been minimized.
This comment has been minimized.
niieani
commented
Jan 17, 2018
•
|
@nojvek awesome job so far! The Puppeteer community would love some progress on this! |
This comment has been minimized.
This comment has been minimized.
|
On it.
…On Wed, Jan 17, 2018 at 2:26 PM Bazyli Brzóska ***@***.***> wrote:
@nojvek <https://github.com/nojvek> the Puppeteer community would love
some progress on this!
|
Bnaya
referenced this pull request
Jan 21, 2018
Closed
Suggestion: generate typescript declarations using angular/clutz (Closure to TypeScript `.d.ts` generator) #1826
nojvek
force-pushed the
nojvek:noEmitJs
branch
from
1ad645c
to
6ad71bb
Jan 21, 2018
nojvek
added some commits
Jan 21, 2018
nojvek
force-pushed the
nojvek:noEmitJs
branch
from
49c0f26
to
e34b4fb
Jan 23, 2018
nojvek
changed the title
noEmitJs flag to enable declarations only output
--emitDeclarationsOnly flag to enable declarations only output
Jan 23, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@DanielRosenwasser and @sheetalkamat any concerns? |
mhegazy
merged commit afc588e
into
Microsoft:master
Jan 25, 2018
5 checks passed
This comment has been minimized.
This comment has been minimized.
niieani
commented
Jan 26, 2018
|
Thank you @nojvek! Looking forward to the next PR |
This comment has been minimized.
This comment has been minimized.
For consistency with
It seems the pattern is to use singular What do you think ? I can send a rename PR |
This comment has been minimized.
This comment has been minimized.
|
humm.. good point.. we can change it to |
This comment has been minimized.
This comment has been minimized.
|
K will send a rename PR
…On Mon, Jan 29, 2018 at 4:05 PM Mohamed Hegazy ***@***.***> wrote:
humm.. good point.. we can change it to EmitDeclarationOnly
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20735 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-JVDl4kIDfOb339mxN7auA52aTAzFYks5tPly4gaJpZM4REbr->
.
|
mhegazy
referenced this pull request
Feb 5, 2018
Merged
Rename switch `--emitDeclarationsOnly` to `--emitDeclarationOnly` #21651
This comment has been minimized.
This comment has been minimized.
|
rename PR up in #21651 |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

nojvek commentedDec 16, 2017
•
edited
masterbranchjake runtestslocally