Skip to content

Conversation

@ahejlsberg
Copy link
Member

Initial port of TypeScript compiler to Go. Currently includes scanner, parser, binder, and beginnings of program construction and checker. For now, very simple project model: All files must be under a common root and program consists of all .ts or .tsx files under that root. No tsconfig.json support yet.

Build and then run on the .ts and .tsx files in a directory

tsgo tscomp

By default this parses and binds all .ts and .tsx files in the directory and then performs a simplified type checking pass that
just resolves identifiers in expression positions. Use -p flag to only parse and bind and skip the check pass. Use -s flag
to parse and bind on a single thread (instead of in parallel on multiple threads). Use -q flag to suppress output of diagnostics.

Lots more to come...

@ahejlsberg ahejlsberg requested a review from jakebailey October 19, 2024 13:31
@ahejlsberg ahejlsberg merged commit da6eb5b into main Oct 21, 2024
10 checks passed
jakebailey pushed a commit that referenced this pull request Jan 17, 2025
Convert tsconfig parsing tests to baselines
nathanwhit added a commit to nathanwhit/typescript-go-rs that referenced this pull request Oct 3, 2025
* Make resolver swappable

* refactor out session / project host

* init wrapper host

* actually use custom host

* more wiring for api

* resolver callbacks

* deno lib files + some fixes

* return both line/char and byte pos

* implied node format on resolver

* add isNodeSourceFile hook

* wip

* massive symbol table refactor

* ughhh

* debugging

* callback for isNodesourceFile

* merge symbol fix

* fixes

* cleanup

* merge fixup

* release workflow

* fix workflow

* fix workflow

* pass source line in diagnostic

* upload source to release

* always treat case sensitive

* do not include lib files

* put binary at root of release zip

* asset libpath
zshannon pushed a commit to crayonnow/typescript-go that referenced this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants