Projects / typescript-go
typescript-go
Contributions to Microsoft’s native TypeScript compiler port in Go. One pull request merged. Later ones closed. The staging repo is archived.
Why
--showConfig has to print the config a user would recognize, including options the compiler fills in. Pull request 3330 adds compileOnSave and the implied compiler options to that output. It was merged.
Diagrams
A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.
The Go printer had to match TypeScript’s --showConfig. Pull request 3330 adds compileOnSave and the implied compiler options to that output. It merged.
flowchart TD
ts["TypeScript showConfig"]
go["Go printer in the port"]
out["compileOnSave and implied options"]
ts --> go --> out
class ts,go,out chosen
The fix is in the printer people already run, not a new flag. Later pull requests, on checker context, JSDoc private identifiers, and the native-preview API, were closed. They are not in the tree.
flowchart TD
q{Options missing from showConfig}
q -->|"print what the TypeScript compiler already implies"| fix["PR 3330, merged"]
q -->|"add a flag for the missing lines"| flag["A new CLI flag"]
later{The pull requests that followed}
later -->|"closed, not in the tree"| closed["Checker, JSDoc, native-preview"]
later -->|"treat a closed request as landed"| landed["A partial merge"]
class fix,closed chosen
class flag,landed rejected
Why this shape
A port is not a new compiler. The Go printer has to match the TypeScript one on the options people already pass, and on the options the compiler implies when they do not pass them. The fix is in that printer, not a new flag.
Later pull requests, on checker context, JSDoc private-identifier checks, and the native-preview API, were closed without merging. I left them closed. The staging repo microsoft/typescript-go is archived, so those branches are not an open line of work.
Where it breaks
A show-config fix is only as good as the set of implied options it knows. A new implied option in the TypeScript compiler will print wrong in the port until someone adds it. And a closed pull request is not a partial merge. The checker and JSDoc changes are not in the tree.