typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

Staging repo for development of native port of TypeScript

Results 434 typescript-go issues
Sort by recently updated
recently updated
newest added

Compiling the following import statement: ```ts import { MailDataRequired } from '@sendgrid/mail'; ``` compiles without error using `tsc`, but the latest `tsgo` fails to resolve the import: ``` node_modules/@sendgrid/mail/src/mail.d.ts:1:9 -...

Domain: Module Resolution
Domain: Type Checking

Follow up more up to date rebase of this https://github.com/microsoft/typescript-go/pull/1636. Address the feat request in this [ticket](https://github.com/microsoft/typescript-go/issues/945), by allowing custom configs to be passed to the tsgo LSP.

In this PR: - Port organize imports functionality for TypeScript and JavaScript - Preserve blank line groupings to respect user's logical organization - Support all import types: side-effect, type-only, namespace,...

## Stack trace ``` [ERROR][2025-11-05 09:38:18] /usr/share/nvim/runtime/lua/vim/lsp/log.lua:151 "rpc" "tsgo" "stderr" "panic handling request completionItem/resolve goroutine 127164 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x5e\ngithub.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc0000f8dc0, 0xc04d6a0870)\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:570 +0x58\npanic({0xb1bd20?, 0xea8770?})\n\truntime/panic.go:783 +0x132\ngithub.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionItemActions(0xc04a4a9b60, {0xeb1f80, 0xc063754410}, 0xc0486ca608, 0xc00cba3b08, 0x15df, 0xc01541f0c0, 0xc01541f180)\n\tgithub.com/microsoft/typescript-go/internal/ls/completions.go:5380 +0x5cc\ngithub.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionItemDetails(0xc04a4a9b60,...

Crash

## Stack trace ``` panic handling request textDocument/completion Could not find symbol 'InternalIdentifier' by key 'InternalIdentifier' in module "c:/Projects/a/b/node_modules/@types/lodash/index" goroutine 1441067 [running]: runtime/debug.Stack() runtime/debug/stack.go:26 +0x5e github.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc0000f4dc0, 0xc119702d80) github.com/microsoft/typescript-go/internal/lsp/server.go:532 +0x58 panic({0x7ff72291a7e0?,...

Crash

## Stack trace ``` panic: vfs: path "https://deno.land/[email protected]/path/mod.ts" is not absolute goroutine 49 [running]: github.com/microsoft/typescript-go/internal/vfs/internal.RootLength({0xc00015644e, 0x29}) github.com/microsoft/typescript-go/internal/vfs/internal/internal.go:23 +0x88 github.com/microsoft/typescript-go/internal/vfs/internal.SplitPath({0xc00015644e?, 0xc0001f4f20?}) github.com/microsoft/typescript-go/internal/vfs/internal/internal.go:30 +0x27 github.com/microsoft/typescript-go/internal/vfs/internal.(*Common).RootAndPath(0x14890f0, {0xc00015644e?, 0xb0b3c0?}) github.com/microsoft/typescript-go/internal/vfs/internal/internal.go:37 +0x25 github.com/microsoft/typescript-go/internal/vfs/internal.(*Common).Stat(0xc0001f4f30?, {0xc00015644e?, 0xc00031ea38?})...

Crash

## Stack trace ``` panic: Failed to marshal build info: json: cannot marshal from Go incremental.BuildInfoDiagnosticsOfFile within "/semanticDiagnosticsPerFile/0": invalid UTF-8 within "/1/1/message" after offset 319 goroutine 1 [running]: github.com/microsoft/typescript-go/internal/incremental.(*Program).emitBuildInfo(0xc002a0c180, {0xdb5728,...

Crash
Domain: Program

https://github.com/microsoft/typescript-go/actions/runs/19048910796/job/54403963356 ``` panic: interface conversion: interface is nil, not fs.FileInfo goroutine 19498 [running]: github.com/microsoft/typescript-go/internal/collections.(*SyncMap[...]).Load(0x223cb60, {0xc0035fa100, 0x3b}) /mnt/vss/_work/typescript-go/typescript-go/internal/collections/syncmap.go:19 +0xdf github.com/microsoft/typescript-go/internal/vfs/cachedvfs.(*FS).Stat(0xc004a40360, {0xc0035fa100, 0x3b}) /mnt/vss/_work/typescript-go/typescript-go/internal/vfs/cachedvfs/cachedvfs.go:126 +0x71 github.com/microsoft/typescript-go/internal/execute/incremental.GetMTime({0x2224da8, 0xc001d1edc0}, {0xc0035fa100, 0x3b}) /mnt/vss/_work/typescript-go/typescript-go/internal/execute/incremental/host.go:33 +0x58 github.com/microsoft/typescript-go/internal/execute/build.(*host).loadOrStoreMTime(0xc00250a8c0,...

Crash

## Steps to reproduce 1. Clone https://github.com/sapphi-red-repros/typescript-go-cjs-named-import-behavior-difference 2. Run `pnpm i` 3. Run `pnpm tsc` and `pnpm tsgo` ## Behavior with `[email protected]` No error ## Behavior with `tsgo` ``` foo.ts:1:19...

Domain: JS

I encountered two bugs while using binary ast. 1. when `FunctionDeclaration.parameter` is empty but not nil, it will occupy a slot but will not generate correspond node. 2. `getOrCreateChildAtNodeIndex` assume...