Skip to content

TypeScript 3.7 — LanguageService.getEmitOutput returns an empty result #33936

Closed

Description

@mjbvz

TypeScript version: 3.7.0-dev.20191010

We're trying to build VS Code using TS 3.7. As part of this, we use TypeScript LanguageService.getEmitOutput method to request the emitted d.ts of various files: https://github.com/microsoft/vscode/blob/363b9769412fea0d9aef07fa1801371c14d72741/build/monaco/api.ts#L619

WIth TS 3.6, getEmitOutputends up returning a result. However with TS 3.7, it returns an empty array starting on one file: vs/editor/common/standalone/standaloneBase

/cc Daniel Rosenwasser (@DanielRosenwasser)

Activity

  1. mjbvz commented on Oct 10, 2019

    @mjbvz
    Author

    A few other observations:

    • getEmitOutput does work correctly for a few files before failing on standaloneBase
    • If I set emitOnlyDtsFiles to false, I do see the js file being output for standaloneBase but not a d.ts file
  2. sheetalkamat commented on Oct 10, 2019

    @sheetalkamat
    Member

    Your tsconfig doesn't have "declaration" enabled and hence its not generating it. 11fd654 changed the way emitOnlyDts works because I had mixed forcing d.ts emit to be always generated with API emitOnlyDts and that could be why you see it. Currently forceDts is internal but do you mind making that method as any and passing that as true to see if that resolves the issue?

  3. mjbvz commented on Oct 10, 2019

    @mjbvz
    Author

    Thanks. If I monkey patch the TS source to set forceDts to true, It does seem to work. I can't figure out how to enable forceDts from our code however

  4. added a commit that references this issue on Oct 15, 2019
    850d16e
  5. added
    Fix AvailableA PR has been opened for this issue
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Fix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions