Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

panic: runtime error: slice bounds out of range [:52400] with length 524 when processing Knex module augmentations #1408

Open
@vpontis

Description

@vpontis

tsgo panics when processing Knex module augmentations with complex generic constraints.

Reproduction

Minimal reproduction:https://github.com/vpontis/tsgo-panic

git clone https://github.com/vpontis/tsgo-paniccd tsgo-panicbun installbun tsgo# panicsbun tsc# works fine

Stack Trace

panic: runtime error: slice bounds out of range [:52400] with length 524goroutine 1 [running]:github.com/microsoft/typescript-go/scanner.(*Scanner).GetLineAndCharacterOfPosition(...)        /Users/victor/go/pkg/mod/github.com/microsoft/typescript-go@v0.0.0-20250116223143-00ad56e4d9d7/scanner/scanner.go:3156github.com/microsoft/typescript-go/scanner.GetLineAndCharacterOfPosition(...)        /Users/victor/go/pkg/mod/github.com/microsoft/typescript-go@v0.0.0-20250116223143-00ad56e4d9d7/scanner/utilities.go:1222github.com/microsoft/typescript-go/transformer.(*transformer).getJSONTypeArgument(0xc002c12240, 0xc0053084c0)        /Users/victor/go/pkg/mod/github.com/microsoft/typescript-go@v0.0.0-20250116223143-00ad56e4d9d7/transformer/declarations.go:2172 +0x125

File

import"knex";// Minimal reproduction of the module augmentation that causes tsgo panicdeclare module"knex"{namespaceKnex{interfaceQueryInterface<TRecordextends{}=any>{firstOrFail<TKeyextendskeyofTRecord>(        ...columns:TKey[]):Knex.QueryBuilder<TRecord,Pick<TRecord,TKey>>&Promise<Pick<TRecord,TKey>>;}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp