Encapsulate the TypeScript parser into a separate lib
See original GitHub issueIssue Analytics
- State:
- Created a year ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
TypeScript encapsulation demystified - Technical Blog at ...
Encapsulation is the perfect example of a mentioned different approach. At the Typescript level, you can use access modifiers public , protected ,...
Read more >Should I try to enforce encapsulation in Typescript?
Lets assume I have an object which has an maintains an array of items. When working with this object I would like to...
Read more >Employing “Namespaces” in TypeScript to encapsulate ...
In this lesson, we are going to learn about the precursor of the ECMAScript module implemented purely in TypeScript.
Read more >Publishing Node modules with TypeScript and ES modules
Write and publish Node modules using TypeScript and ES modules so you can provide an easy experience for the consumers of your package....
Read more >TSConfig Reference - Docs on every TSConfig option
Project references are a way to structure your TypeScript programs into smaller pieces. Using Project References can greatly improve build and editor ...
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 Free
Top 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
Which classes specifically are you referring to? If you’re talking about the AST branch, then yes, those are hand-written.
The intended work is to make a TypeScript type declaration parser capable of parsing raw
.d.ts
files and using this metadata to drive my C# source generator. I would define success as being able to source generate arbitrary files, outside thelib.dom.d.ts
(which by the way no longer exists), and using that to generate types. As of right now, my project is already capable of source-generating services (interface
andclass
C#), POCOs, and dependency hierarchies.My project manages to use
JSImport
because its JS interop architecture is fundamentally different, but that’s out of scope for this issue.I am curious how you managed to create those hundreds of classes. Were they generated somehow or were they hand-written?
Also is the intended work limited to porting
parser.ts
only or will it one day extend to other APIs likebinder.ts
, which is responsible for symbol resolution?Finally, please tell me if you know some documentation/guides on consuming the TypeScript compiler API from an outside program. I can find things like this but they mostly document the compiler internals and not how to consume those APIs like how one can use Roslyn.