Suggestion: Typescript only mode
See original GitHub issueAt @echo-health use Typescript in all of our projects and were wondering whether there would be any interest in adding a ‘mode’ to Typewriter so that it only outputs types that enforce the tracking schema instead of javascript code. We would be happy to take this on as a contribution
This would be preferable for us for the following reasons:
- It would not impact our bundle size in production at all
- It would circumvent any issues around browser support + proxies (like: https://github.com/segmentio/typewriter/issues/119)
I’m intentionally not going to propose any naming or CLI flags here to first be able to talk about the idea in principle.
Should you not want this to be in-scope of this project, would you be ok with a separate community contributed package (e.g. Something like ts-typewriter
or the like)?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TSConfig Reference - Docs on every TSConfig option
Currently, the only top-level property that is excluded from inheritance is references ... Ensures that your files are parsed in the ECMAScript strict...
Read more >Skip typechecking; only emit (support --transpileOnly in tsc , re ...
Suggestion. Support a compilation mode where files are only transpiled without typechecking. This can greatly improve compilation speed. Similar ...
Read more >TypeScript Programming with Visual Studio Code
Tip: You can disable snippets by setting editor.snippetSuggestions to "none" in your settings file. If you'd like to see snippets, you can specify...
Read more >TypeScript | IntelliJ IDEA Documentation - JetBrains
Javascript and TypeScript - The plugin is available only in IntelliJ IDEA Ultimate, where it is enabled by default.
Read more >How to disable TypeScript warnings in VSCode?
As per here, you can disable built-in extensions in VSCode now. In the Extensions tab on the left (Ctrl+Shift+X), search for @builtin + ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think a flag of some kind makes the most sense!
I’d expect folks would either want to instrument typewriter using generated functions, or they’d want to use
analytics.*
methods directly, so it’s better to generate code that only offers a single way to instrument analytics. Making it opt-in would also make any changes backwards compatible, as you brought up 😃No longer using Segment unfortunately and have not had a chance to update this in a while… closing!