question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow "Compiler Plugins"

See original GitHub issue

From wiki:

TypeScript Language Service Plugins (“plugins”) are for changing the editing experience only

TypeScript plugins are very limited. Plugins should be able to:

  • Apply Transformers
  • Provide type definitions
  • Override module resolver (LanguageServiceHost#resolveModuleNames)
  • Emit code beside TypeScript standard output

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1279
  • Comments:38 (7 by maintainers)

github_iconTop GitHub Comments

85reactions
mohsen1commented, Jun 20, 2017

I’m not familiar with TypeScript well enough to write a proposal. Instead I can list a few plugins that can be useful and exist in the wild in other forms (Webpack plugin, Babel transforms) to make a case for having such extensibility:

Custom module resolution

Code transformers

Emitting other code

  • A Swagger code generator embedded in TypeScript plugin
  • Functionality similar to Webpack: emitting image and other asset files

Providing types

  • Typed GraphQL query responses
    • This applies to pretty much any database query language. Result of a query can be typed based on query

There are so many other use-cases for compiler plugins that I’m not aware of but I’m sure compiler plugins will make TypeScript ecosystem thrive.

34reactions
glen-84commented, May 15, 2020

@DanielRosenwasser,

The TypeScript 3.8 Iteration Plan included “Plugin Investigation” under the Expected Work Items – was any progress made in that regard?

Will this issue be considered for the next roadmap (July - December 2020)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

9.3. Compiler Plugins - Haskell.org
A Plugin effectively holds a function which installs a compilation pass into the compiler pipeline. By default there is the empty plugin which...
Read more >
sbt Reference Manual — Compiler Plugin Support
Compiler Plugin Support. There is some special support for using compiler plugins. You can set autoCompilerPlugins to true to enable this functionality.
Read more >
sbt - How to enable compiler plugin from libraryDependencies?
Option #2 is to try to ensure their is a transitive compiler-plugin->compiler-plugin configuration dependency chain between your project and the project where ...
Read more >
Apache Maven Compiler Plugin
to enable/disable incremental compilation feature. This leads to two different modes depending on the underlying compiler. The default javac ...
Read more >
All-open compiler plugin | Kotlin Documentation
If you use Spring, you can enable the kotlin-spring compiler plugin instead of specifying Spring annotations manually. The kotlin-spring is a wrapper on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found