Skip to content

Commit 2a56c07

Browse files
committed
more errors
1 parent 383bd1c commit 2a56c07

File tree

7 files changed

+12
-2
lines changed

7 files changed

+12
-2
lines changed

internal/ast/diagnostic.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ func (d *Diagnostic) Len() int { return d.loc.Len() }
3535
func (d *Diagnostic) Loc() core.TextRange { return d.loc }
3636
func (d *Diagnostic) Code() int32 { return d.code }
3737
func (d *Diagnostic) Category() diagnostics.Category { return d.category }
38+
func (d *Diagnostic) Message() string { return d.message.String() }
3839
func (d *Diagnostic) MessageKey() diagnostics.Key { return d.messageKey }
3940
func (d *Diagnostic) MessageArgs() []string { return d.messageArgs }
4041
func (d *Diagnostic) MessageChain() []*Diagnostic { return d.messageChain }

internal/compiler/program.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ func (p *Program) GetTypeCheckerForFileExclusive(ctx context.Context, file *ast.
414414
return p.checkerPool.GetCheckerForFileExclusive(ctx, file)
415415
}
416416

417-
func (p *Program) GetResolvedModule(file ast.HasFileName, moduleReference string, mode core.ResolutionMode) *module.ResolvedModule {
417+
func (p *Program) GetResolvedModule(file ast.HasFileName, moduleReference string, mode core.ResolutionMode, importAttributeType string) *module.ResolvedModule {
418418
if resolutions, ok := p.resolvedModules[file.Path()]; ok {
419419
if resolved, ok := resolutions[module.ModeAwareCacheKey{Name: moduleReference, Mode: mode, ImportAttributeType: importAttributeType}]; ok {
420420
return resolved

internal/execute/build/compilerHost.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package build
33
import (
44
"github.com/microsoft/typescript-go/internal/ast"
55
"github.com/microsoft/typescript-go/internal/compiler"
6+
"github.com/microsoft/typescript-go/internal/core"
7+
"github.com/microsoft/typescript-go/internal/module"
68
"github.com/microsoft/typescript-go/internal/diagnostics"
79
"github.com/microsoft/typescript-go/internal/tsoptions"
810
"github.com/microsoft/typescript-go/internal/tspath"

internal/execute/build/host.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/microsoft/typescript-go/internal/ast"
77
"github.com/microsoft/typescript-go/internal/collections"
88
"github.com/microsoft/typescript-go/internal/compiler"
9+
"github.com/microsoft/typescript-go/internal/core"
910
"github.com/microsoft/typescript-go/internal/diagnostics"
1011
"github.com/microsoft/typescript-go/internal/execute/incremental"
1112
"github.com/microsoft/typescript-go/internal/execute/tsc"

internal/ls/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ type diagnosticList struct {
8383
func (d *diagnosticList) addDiagnostic(diagnostic *ast.Diagnostic, ls *LanguageService, shouldAdd bool) *Diagnostic {
8484
startPos := diagnostic.Loc().Pos()
8585
startPosLineCol := getPosition(diagnostic.File(), startPos, ls)
86-
lineMap := ls.converters.getLineMap(diagnostic.File().FileName())
86+
lineMap := ls.converters.GetLineMap(diagnostic.File().FileName())
8787
lineStartPos := lineMap.LineStarts[startPosLineCol.Line]
8888
var lineEndPos int
8989
if int(startPosLineCol.Line+1) >= len(lineMap.LineStarts) {

internal/ls/lsconv/converters.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func NewConverters(positionEncoding lsproto.PositionEncodingKind, getLineMap fun
3636
}
3737
}
3838

39+
func (c *Converters) GetLineMap(fileName string) *LSPLineMap {
40+
return c.getLineMap(fileName)
41+
}
42+
3943
func (c *Converters) ToLSPRange(script Script, textRange core.TextRange) lsproto.Range {
4044
return lsproto.Range{
4145
Start: c.PositionToLineAndCharacter(script, core.TextPos(textRange.Pos())),

internal/project/compilerhost.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import (
66
"github.com/microsoft/typescript-go/internal/ast"
77
"github.com/microsoft/typescript-go/internal/collections"
88
"github.com/microsoft/typescript-go/internal/compiler"
9+
"github.com/microsoft/typescript-go/internal/core"
910
"github.com/microsoft/typescript-go/internal/diagnostics"
11+
"github.com/microsoft/typescript-go/internal/module"
1012
"github.com/microsoft/typescript-go/internal/project/logging"
1113
"github.com/microsoft/typescript-go/internal/tsoptions"
1214
"github.com/microsoft/typescript-go/internal/tspath"

0 commit comments

Comments
 (0)