Skip to content

Commit 093107c

Browse files
Update readme (#422)
Co-authored-by: Daniel Rosenwasser <[email protected]>
1 parent d29fad0 commit 093107c

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

README.md

+62-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# typescript-go
1+
# TypeScript 7
22

3-
```console
4-
$ go run github.com/microsoft/typescript-go/cmd/tsgo@latest
5-
```
3+
[Not sure what this is? Read the announcement post!](https://devblogs.microsoft.com/typescript/typescript-native-port/)
64

7-
For a list of intentional changes with respect to Typescript 5.7, see CHANGES.md.
5+
This repo is very much under active development; as such there are no published artifacts at this time.
6+
Interested developers can clone and run locally to try out things as they become available.
87

9-
## Local development
8+
## How to Build and Run
109

11-
This repo uses Go and TypeScript. For a full development experience, you'll need to have both installed.
10+
This repo uses [Go 1.24 or higher](https://go.dev/dl/), [Node.js with npm](https://nodejs.org/), and [`hereby`](https://www.npmjs.com/package/hereby).
1211

1312
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.
1413
When cloning, you'll want to clone with submodules:
@@ -39,6 +38,62 @@ Additional tasks are a work in progress.
3938
`hereby` is not required to work on the repo; the regular `go` tooling (e.g., `go build`, `go test ./...`) will work as expected.
4039
`hereby` tasks are provided as a convenience for those familiar with the TypeScript repo.
4140

41+
### Running `tsgo`
42+
43+
After running `hereby build`, you can run `built/local/tsgo`, which behaves mostly the same as `tsc` (respects tsconfig, but also prints out perf stats).
44+
This is mainly a testing entry point; for higher fidelity with regular `tsc`, run `tsgo tsc [flags]`, which behaves more similarly to `tsc`.
45+
46+
### Running LSP Prototype
47+
48+
To try the prototype LSP experience:
49+
50+
* Run VS Code in the repo workspace (`code .`)
51+
* Copy `.vscode/launch.template.json` to `.vscode/launch.json`
52+
* <kbd>F5</kbd> (or `Debug: Start Debugging` from the command palette)
53+
54+
This will launch a new VS Code instance which uses the Corsa LS as the backend. If correctly set up, you should see "typescript-go" as an option in the Output pane:
55+
56+
![LSP Prototype Screenshot](ls-screenshot.png)
57+
58+
59+
## What Works So Far?
60+
61+
This is still a work in progress and is not yet at full feature parity with TypeScript. Bugs may exist. Please check this list carefully before logging a new issue or assuming an intentional change.
62+
63+
Status overview:
64+
65+
* Program creation (read `lib`, `target`, `reference`, `import`, `files`, `include`, and `exclude`): **done**. You should see the *same files*, with modules resolved to the *same locations*, as in a TypeScript 5.8 (TS5.8) invocation
66+
* Not all resolution modes are supported yet
67+
* Parsing/scanning (read source text and determine syntax shape): **done**. You should see the exact same *syntax errors* as in a TS5.8 invocation
68+
* Commandline and `tsconfig.json` parsing: **mostly done**. Note that the entry point is slightly different (for now)
69+
* Type resolution (resolve computed types to a concrete internal representation): **done**. You should see the same types as in TS5.8
70+
* Type checking (check for problems in functions, classes, and statements): **done**. You should see the same errors, in the same locations, with the same messages, as TS 5.8
71+
* Types printback in errors may display slightly differently; this is in progress
72+
* JavaScript-specific inference and JS Doc: **not ready**
73+
* JSX: **not ready**
74+
* Declaration emit: **not ready**. Coming soon!
75+
* Emit (JS output): **in progress**. `target: esnext` (minimal downleveling) is well-supported but other targets may have gaps
76+
* Watch mode: **prototype** (watches the correct files and rebuilds, but doesn't do incremental rechecking)
77+
* Build mode / project references: **not ready**
78+
* Incremental build: **not ready**
79+
* Language service (LSP): **prototype** only, expect minimal functionality (errors, hover, go to def). More features soon!
80+
* ASCII files only for now
81+
* API: **not ready**
82+
83+
Definitions:
84+
85+
* **done** aka "believed done": We're not currently aware of any deficits or major left work to do. OK to log bugs
86+
* **in progress**: currently being worked on; some features may work and some might not. OK to log panics, but nothing else please
87+
* **prototype**: proof-of-concept only; do not log bugs
88+
* **not ready**: either haven't even started yet, or far enough from ready that you shouldn't bother messing with it yet
89+
90+
## Other Notes
91+
92+
Long-term, we expect this repo is that its contents will be merged into `microsoft/TypeScript`.
93+
As a result, the repo and issue tracker for typescript-go will eventually be closed, so treat discussions/issues accordingly.
94+
95+
For a list of intentional changes with respect to Typescript 5.7, see CHANGES.md.
96+
4297
## Contributing
4398

4499
This project welcomes contributions and suggestions. Most contributions require you to agree to a

ls-screenshot.png

78.8 KB
Loading

0 commit comments

Comments
 (0)