vendor tsgo
This commit is contained in:
20
tools/tsgo/internal/core/projectreference.go
Normal file
20
tools/tsgo/internal/core/projectreference.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package core
|
||||
|
||||
import "github.com/microsoft/typescript-go/internal/tspath"
|
||||
|
||||
type ProjectReference struct {
|
||||
Path string
|
||||
OriginalPath string
|
||||
Circular bool
|
||||
}
|
||||
|
||||
func ResolveProjectReferencePath(ref *ProjectReference) string {
|
||||
return ResolveConfigFileNameOfProjectReference(ref.Path)
|
||||
}
|
||||
|
||||
func ResolveConfigFileNameOfProjectReference(path string) string {
|
||||
if tspath.FileExtensionIs(path, tspath.ExtensionJson) {
|
||||
return path
|
||||
}
|
||||
return tspath.CombinePaths(path, "tsconfig.json")
|
||||
}
|
||||
Reference in New Issue
Block a user