MCPcopy
hub / github.com/microsoft/typescript-go

github.com/microsoft/typescript-go @main sqlite

repository ↗ · DeepWiki ↗
83,613 symbols 256,745 edges 18,088 files 8,709 documented · 10%
README

TypeScript 7

Not sure what this is? Read the announcement post!

Preview

A preview build is available on npm as @typescript/native-preview.

npm install @typescript/native-preview
npx tsgo # Use this as you would tsc.

For TypeScript 7.0 RC and later, the command name is tsc.

A preview VS Code extension is available on the VS Code marketplace.

To use this, set this in your VS Code settings:

{
    "js/ts.experimental.useTsgo": true
}

What Works So Far?

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.

Feature Status Notes
Program creation done Same files and module resolution as TS 6.0. Not all resolution modes supported yet.
Parsing/scanning done Exact same syntax errors as TS 6.0
Commandline and tsconfig.json parsing done Done, though tsconfig errors may not be as helpful.
Type resolution done Same types as TS 6.0.
Type checking done Same errors, locations, and messages as TS 6.0. Types printback in errors may display differently.
JavaScript-specific inference and JSDoc done Complete, but intentionally lacking some features. Declaration emit differs greatly, intentionally, to be closer to TS declarations.
JSX done -
Declaration emit done -
Emit (JS output) done -
Watch mode prototype Watches files and rebuilds, but no incremental rechecking. Not optimized.
Build mode / project references done -
Incremental build done -
Language service (LSP) in progress Nearly all features implemented.
API not ready -

Definitions:

  • done aka "believed done": We're not currently aware of any deficits or major work left to do. OK to log bugs
  • in progress: currently being worked on; some features may work and some might not. OK to log panics, but nothing else please
  • prototype: proof-of-concept only; do not log bugs
  • not ready: either haven't even started yet, or far enough from ready that you shouldn't bother messing with it yet

Other Notes

Long-term, we expect that this repo and its contents will be merged into microsoft/TypeScript. As a result, the repo and issue tracker for typescript-go will eventually be closed, so treat discussions/issues accordingly.

For a list of intentional changes with respect to TypeScript 6.0, see CHANGES.md.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit Contributor License Agreements.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Extension points exported contracts — how you extend this code

Named (Interface)
Named is a constraint for types that can provide their name. [54 implementers]
internal/ls/autoimport/index.go
FS (Interface)
go:generate go tool github.com/matryer/moq -fmt goimports -out vfsmock/mock_generated.go -pkg vfsmock . FS go:generate n [10 …
internal/vfs/vfs.go
IterableIterator (Interface)
* Describes a user-defined Iterator that is also iterable. [11 implementers]
internal/bundled/libs/lib.es2015.iterable.d.ts
EmitTextWriter (Interface)
Externally opaque interface for printing text [5 implementers]
internal/printer/emittextwriter.go
IArguments (Interface)
(no doc) [11 implementers]
testdata/baselines/reference/tsc/commandLine/Parse--p.js
Interface (Interface)
(no doc) [67 implementers]
testdata/tests/cases/compiler/declarationEmitAugmentationUsesCorrectSourceFile.ts
VersionQuickPickItem (Interface)
(no doc) [20 implementers]
_extension/src/session.ts
Writer (Interface)
(no doc) [12 implementers]
internal/lsp/server.go

Core symbols most depended-on inside this repo

len
called by 4682
testdata/baselines/reference/submodule/conformance/controlFlowIterationErrors.js
RecoverAndFail
called by 4444
internal/testutil/testutil.go
NewFourslash
called by 4441
internal/fourslash/fourslash.go
defineProperty
called by 4123
internal/bundled/libs/lib.es5.d.ts
SkipIfFailing
called by 3820
internal/fourslash/skip_if_failing.go
new
called by 3218
testdata/baselines/reference/submodule/compiler/emitMethodCalledNew.js
append
called by 2292
testdata/baselines/reference/submodule/conformance/literalTypes2.js
AsNode
called by 2088
internal/ast/ast.go

Shape

Method 27,810
Function 22,781
Class 20,017
Interface 9,796
Struct 2,024
Enum 855
TypeAlias 313
FuncType 17

Languages

TypeScript73%
Go27%

Modules by API surface

internal/bundled/libs/lib.dom.d.ts3,630 symbols
internal/ast/ast_generated.go1,612 symbols
internal/bundled/libs/lib.webworker.d.ts1,571 symbols
internal/checker/checker.go1,562 symbols
internal/lsp/lsproto/lsp_generated.go1,424 symbols
testdata/baselines/reference/submodule/compiler/resolvingClassDeclarationWhenInBaseTypeResolution.js886 symbols
_packages/native-preview/src/ast/factory.generated.ts514 symbols
internal/bundled/libs/lib.es5.d.ts506 symbols
internal/parser/parser.go433 symbols
internal/ast/utilities.go424 symbols
testdata/baselines/reference/submodule/conformance/generatedContextualTyping.js404 symbols
testdata/baselines/reference/submodule/compiler/underscoreTest1.js396 symbols

Dependencies from manifests, versioned

github.com/Microsoft/go-winiov0.6.2 · 1×
github.com/go-json-experiment/jsonv0.0.0-2026062318194 · 1×
github.com/golangci/plugin-module-registerv0.1.2 · 1×
github.com/klauspost/cpuid/v2v2.2.10 · 1×
github.com/mackerelio/go-osstatv0.2.7 · 1×
github.com/matryer/moqv0.7.1 · 1×
github.com/peter-evans/patiencev0.3.0 · 1×
github.com/zeebo/xxh3v1.1.0 · 1×
golang.org/x/modv0.37.0 · 1×
golang.org/x/syncv0.21.0 · 1×
golang.org/x/sysv0.46.0 · 1×

For agents

$ claude mcp add typescript-go \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact