Skip to content

Commit b17e309

Browse files
Gabriela Araujo BrittoGabriela Araujo Britto
authored andcommitted
Merge branch 'gabritto/fix-error-id' of https://github.com/microsoft/typescript-go into gabritto/fix-error-id
2 parents 38c2acf + c495384 commit b17e309

File tree

623 files changed

+3918
-5118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+3918
-5118
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
22

3-
version: v2.8.0
3+
version: v2.9.0
44

55
destination: ./_tools
66

.devcontainer/devcontainer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"Install Graphviz": "sudo apt update -y; sudo apt install -y graphviz"
2929
},
3030

31+
"containerEnv": {
32+
"GOTOOLCHAIN": "auto"
33+
},
34+
3135
// Configure tool-specific properties.
3236
"customizations": {
3337
"vscode": {

.dprint.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"trailingCommas": "never"
3939
},
4040
"gofumpt": {
41-
"langVersion": "go1.25",
41+
"langVersion": "go1.26",
4242
"modulePath": "github.com/microsoft/typescript-go"
4343
},
4444
"excludes": [

.github/actions/setup-go/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Setup Go
44
inputs:
55
go-version:
66
description: Go version to set up in go-install.ps1 format
7-
default: 'go1.25'
7+
default: 'go1.26'
88
create:
99
description: Create the cache
1010
default: 'false'

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TypeScript 7.0 will be a key bridge release between TypeScript 6.0 (the [last Ja
66

77
## How to Build and Run
88

9-
This repo uses [Go 1.25 or higher](https://go.dev/dl/), [Rust 1.88 or higher](https://www.rust-lang.org/tools/install), [Node.js with npm](https://nodejs.org/), and [`hereby`](https://www.npmjs.com/package/hereby).
9+
This repo uses [Go 1.26 or higher](https://go.dev/dl/), [Rust 1.88 or higher](https://www.rust-lang.org/tools/install), [Node.js with npm](https://nodejs.org/), and [`hereby`](https://www.npmjs.com/package/hereby).
1010

1111
For tests and code generation, this repo contains a git submodule to the main TypeScript repo pointing to the commit being ported.
1212
When cloning, you'll want to clone with submodules:

_tools/customlint/testdata/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module testdata
22

3-
go 1.25
3+
go 1.26

_tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/microsoft/typescript-go/_tools
22

3-
go 1.25
3+
go 1.26
44

55
require (
66
github.com/golangci/plugin-module-register v0.1.2

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/microsoft/typescript-go
22

3-
go 1.25
3+
go 1.26
44

55
require (
66
github.com/Microsoft/go-winio v0.6.2

internal/ast/utilities.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3969,7 +3969,7 @@ func HasContextSensitiveParameters(node *Node) bool {
39693969
// an implicit 'this' parameter which is subject to contextual typing.
39703970
parameter := core.FirstOrNil(node.Parameters())
39713971
if parameter == nil || !IsThisParameter(parameter) {
3972-
return true
3972+
return node.Flags&NodeFlagsContainsThis != 0
39733973
}
39743974
}
39753975
}

internal/astnav/tokens.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func FindPrecedingTokenEx(sourceFile *ast.SourceFile, position int, startNode *a
394394
}
395395
}
396396
if jsDoc != nil {
397-
if !excludeJSDoc {
397+
if !excludeJSDoc && position < jsDoc.End() {
398398
return find(jsDoc)
399399
} else {
400400
return findRightmostValidToken(jsDoc.End(), sourceFile, n, position, excludeJSDoc)

0 commit comments

Comments
 (0)