@ttsc/wasm 0.11.0-dev.20260517
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/build/build-wasm.cjs +240 -0
- package/build/pack-prepare.cjs +68 -0
- package/cmd/ttsc-wasm/main.go +130 -0
- package/cmd/ttsc-wasm/main_wasm.go +17 -0
- package/dist/go.mod +54 -0
- package/dist/ttsc.wasm +0 -0
- package/dist/wasm_exec.js +575 -0
- package/go.mod +54 -0
- package/go.sum +26 -0
- package/host/api.go +205 -0
- package/host/doc.go +31 -0
- package/host/host.go +317 -0
- package/host/host_native.go +12 -0
- package/host/plugin.go +59 -0
- package/lib/src/MemFS.d.ts +68 -0
- package/lib/src/MemFS.js +384 -0
- package/lib/src/MemFS.js.map +1 -0
- package/lib/src/api.d.ts +87 -0
- package/lib/src/api.js +20 -0
- package/lib/src/api.js.map +1 -0
- package/lib/src/index.d.ts +6 -0
- package/lib/src/index.js +10 -0
- package/lib/src/index.js.map +1 -0
- package/lib/src/instantiate.d.ts +27 -0
- package/lib/src/instantiate.js +71 -0
- package/lib/src/instantiate.js.map +1 -0
- package/package.json +49 -0
- package/src/MemFS.ts +566 -0
- package/src/api.ts +112 -0
- package/src/index.ts +28 -0
- package/src/instantiate.ts +114 -0
- package/vendor/shim/ast/extra-shim.json +4 -0
- package/vendor/shim/ast/go.mod +5 -0
- package/vendor/shim/ast/lint.go +328 -0
- package/vendor/shim/ast/shim.go +220 -0
- package/vendor/shim/ast/surface.go +685 -0
- package/vendor/shim/bundled/extra-shim.json +1 -0
- package/vendor/shim/bundled/go.mod +5 -0
- package/vendor/shim/bundled/shim.go +23 -0
- package/vendor/shim/checker/extra-shim.json +31 -0
- package/vendor/shim/checker/go.mod +5 -0
- package/vendor/shim/checker/shim.go +174 -0
- package/vendor/shim/compiler/extra-shim.json +4 -0
- package/vendor/shim/compiler/go.mod +5 -0
- package/vendor/shim/compiler/shim.go +65 -0
- package/vendor/shim/core/extra-shim.json +4 -0
- package/vendor/shim/core/go.mod +5 -0
- package/vendor/shim/core/shim.go +29 -0
- package/vendor/shim/diagnosticwriter/go.mod +5 -0
- package/vendor/shim/diagnosticwriter/lint.go +145 -0
- package/vendor/shim/diagnosticwriter/shim.go +29 -0
- package/vendor/shim/lsp/extra-shim.json +4 -0
- package/vendor/shim/lsp/go.mod +16 -0
- package/vendor/shim/lsp/go.sum +26 -0
- package/vendor/shim/lsp/shim.go +42 -0
- package/vendor/shim/parser/extra-shim.json +4 -0
- package/vendor/shim/parser/go.mod +5 -0
- package/vendor/shim/parser/shim.go +61 -0
- package/vendor/shim/printer/go.mod +5 -0
- package/vendor/shim/printer/shim.go +23 -0
- package/vendor/shim/scanner/extra-shim.json +4 -0
- package/vendor/shim/scanner/go.mod +5 -0
- package/vendor/shim/scanner/shim.go +134 -0
- package/vendor/shim/tsoptions/extra-shim.json +4 -0
- package/vendor/shim/tsoptions/go.mod +5 -0
- package/vendor/shim/tsoptions/shim.go +173 -0
- package/vendor/shim/tspath/extra-shim.json +4 -0
- package/vendor/shim/tspath/go.mod +5 -0
- package/vendor/shim/tspath/shim.go +236 -0
- package/vendor/shim/vfs/cachedvfs/extra-shim.json +4 -0
- package/vendor/shim/vfs/cachedvfs/go.mod +5 -0
- package/vendor/shim/vfs/cachedvfs/shim.go +12 -0
- package/vendor/shim/vfs/extra-shim.json +4 -0
- package/vendor/shim/vfs/go.mod +5 -0
- package/vendor/shim/vfs/osvfs/extra-shim.json +4 -0
- package/vendor/shim/vfs/osvfs/go.mod +5 -0
- package/vendor/shim/vfs/osvfs/shim.go +13 -0
- package/vendor/shim/vfs/shim.go +22 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package parser
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/typescript-go/internal/ast"
|
|
6
|
+
import "github.com/microsoft/typescript-go/internal/core"
|
|
7
|
+
import "github.com/microsoft/typescript-go/internal/parser"
|
|
8
|
+
import _ "unsafe"
|
|
9
|
+
|
|
10
|
+
//go:linkname GetJSDocCommentRanges github.com/microsoft/typescript-go/internal/parser.GetJSDocCommentRanges
|
|
11
|
+
func GetJSDocCommentRanges(f *ast.NodeFactory, commentRanges []ast.CommentRange, node *ast.Node, text string) []ast.CommentRange
|
|
12
|
+
|
|
13
|
+
type JSDocInfo = parser.JSDocInfo
|
|
14
|
+
|
|
15
|
+
const PCArgumentExpressions = parser.PCArgumentExpressions
|
|
16
|
+
const PCArrayBindingElements = parser.PCArrayBindingElements
|
|
17
|
+
const PCArrayLiteralMembers = parser.PCArrayLiteralMembers
|
|
18
|
+
const PCBlockStatements = parser.PCBlockStatements
|
|
19
|
+
const PCClassMembers = parser.PCClassMembers
|
|
20
|
+
const PCCount = parser.PCCount
|
|
21
|
+
const PCEnumMembers = parser.PCEnumMembers
|
|
22
|
+
const PCHeritageClauseElement = parser.PCHeritageClauseElement
|
|
23
|
+
const PCHeritageClauses = parser.PCHeritageClauses
|
|
24
|
+
const PCImportAttributes = parser.PCImportAttributes
|
|
25
|
+
const PCImportOrExportSpecifiers = parser.PCImportOrExportSpecifiers
|
|
26
|
+
const PCJSDocComment = parser.PCJSDocComment
|
|
27
|
+
const PCJSDocParameters = parser.PCJSDocParameters
|
|
28
|
+
const PCJsxAttributes = parser.PCJsxAttributes
|
|
29
|
+
const PCJsxChildren = parser.PCJsxChildren
|
|
30
|
+
const PCObjectBindingElements = parser.PCObjectBindingElements
|
|
31
|
+
const PCObjectLiteralMembers = parser.PCObjectLiteralMembers
|
|
32
|
+
const PCParameters = parser.PCParameters
|
|
33
|
+
const PCRestProperties = parser.PCRestProperties
|
|
34
|
+
const PCSourceElements = parser.PCSourceElements
|
|
35
|
+
const PCSwitchClauseStatements = parser.PCSwitchClauseStatements
|
|
36
|
+
const PCSwitchClauses = parser.PCSwitchClauses
|
|
37
|
+
const PCTupleElementTypes = parser.PCTupleElementTypes
|
|
38
|
+
const PCTypeArguments = parser.PCTypeArguments
|
|
39
|
+
const PCTypeMembers = parser.PCTypeMembers
|
|
40
|
+
const PCTypeParameters = parser.PCTypeParameters
|
|
41
|
+
const PCVariableDeclarations = parser.PCVariableDeclarations
|
|
42
|
+
|
|
43
|
+
type ParseFlags = parser.ParseFlags
|
|
44
|
+
|
|
45
|
+
const ParseFlagsAwait = parser.ParseFlagsAwait
|
|
46
|
+
const ParseFlagsIgnoreMissingOpenBrace = parser.ParseFlagsIgnoreMissingOpenBrace
|
|
47
|
+
const ParseFlagsJSDoc = parser.ParseFlagsJSDoc
|
|
48
|
+
const ParseFlagsNone = parser.ParseFlagsNone
|
|
49
|
+
const ParseFlagsType = parser.ParseFlagsType
|
|
50
|
+
const ParseFlagsYield = parser.ParseFlagsYield
|
|
51
|
+
|
|
52
|
+
//go:linkname ParseIsolatedEntityName github.com/microsoft/typescript-go/internal/parser.ParseIsolatedEntityName
|
|
53
|
+
func ParseIsolatedEntityName(text string) *ast.EntityName
|
|
54
|
+
|
|
55
|
+
//go:linkname ParseSourceFile github.com/microsoft/typescript-go/internal/parser.ParseSourceFile
|
|
56
|
+
func ParseSourceFile(opts ast.SourceFileParseOptions, sourceText string, scriptKind core.ScriptKind) *ast.SourceFile
|
|
57
|
+
|
|
58
|
+
type Parser = parser.Parser
|
|
59
|
+
type ParserState = parser.ParserState
|
|
60
|
+
type ParsingContext = parser.ParsingContext
|
|
61
|
+
type ParsingContexts = parser.ParsingContexts
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package printer
|
|
2
|
+
|
|
3
|
+
import (
|
|
4
|
+
"github.com/microsoft/typescript-go/internal/ast"
|
|
5
|
+
innerprinter "github.com/microsoft/typescript-go/internal/printer"
|
|
6
|
+
)
|
|
7
|
+
|
|
8
|
+
type PrintHandlers = innerprinter.PrintHandlers
|
|
9
|
+
type Printer = innerprinter.Printer
|
|
10
|
+
type PrinterOptions = innerprinter.PrinterOptions
|
|
11
|
+
type EmitContext = innerprinter.EmitContext
|
|
12
|
+
|
|
13
|
+
func NewPrinter(options PrinterOptions, handlers PrintHandlers, emitContext *EmitContext) *Printer {
|
|
14
|
+
return innerprinter.NewPrinter(options, handlers, emitContext)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func NewEmitContext() *EmitContext {
|
|
18
|
+
return innerprinter.NewEmitContext()
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
func EmitSourceFile(p *Printer, sourceFile *ast.SourceFile) string {
|
|
22
|
+
return p.EmitSourceFile(sourceFile)
|
|
23
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package scanner
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/typescript-go/internal/ast"
|
|
6
|
+
import "github.com/microsoft/typescript-go/internal/core"
|
|
7
|
+
import "github.com/microsoft/typescript-go/internal/scanner"
|
|
8
|
+
import "iter"
|
|
9
|
+
import _ "unsafe"
|
|
10
|
+
|
|
11
|
+
//go:linkname ComputeLineOfPosition github.com/microsoft/typescript-go/internal/scanner.ComputeLineOfPosition
|
|
12
|
+
func ComputeLineOfPosition(lineStarts []core.TextPos, pos int) int
|
|
13
|
+
|
|
14
|
+
//go:linkname ComputePositionOfLineAndByteOffset github.com/microsoft/typescript-go/internal/scanner.ComputePositionOfLineAndByteOffset
|
|
15
|
+
func ComputePositionOfLineAndByteOffset(lineStarts []core.TextPos, line int, byteOffset int) int
|
|
16
|
+
|
|
17
|
+
//go:linkname ComputePositionOfLineAndUTF16Character github.com/microsoft/typescript-go/internal/scanner.ComputePositionOfLineAndUTF16Character
|
|
18
|
+
func ComputePositionOfLineAndUTF16Character(lineStarts []core.TextPos, line int, character core.UTF16Offset, text string, allowEdits bool) int
|
|
19
|
+
|
|
20
|
+
//go:linkname DeclarationNameToString github.com/microsoft/typescript-go/internal/scanner.DeclarationNameToString
|
|
21
|
+
func DeclarationNameToString(name *ast.Node) string
|
|
22
|
+
|
|
23
|
+
type ErrorCallback = scanner.ErrorCallback
|
|
24
|
+
type EscapeSequenceScanningFlags = scanner.EscapeSequenceScanningFlags
|
|
25
|
+
|
|
26
|
+
const EscapeSequenceScanningFlagsAllowExtendedUnicodeEscape = scanner.EscapeSequenceScanningFlagsAllowExtendedUnicodeEscape
|
|
27
|
+
const EscapeSequenceScanningFlagsAnnexB = scanner.EscapeSequenceScanningFlagsAnnexB
|
|
28
|
+
const EscapeSequenceScanningFlagsAnyUnicodeMode = scanner.EscapeSequenceScanningFlagsAnyUnicodeMode
|
|
29
|
+
const EscapeSequenceScanningFlagsAtomEscape = scanner.EscapeSequenceScanningFlagsAtomEscape
|
|
30
|
+
const EscapeSequenceScanningFlagsRegularExpression = scanner.EscapeSequenceScanningFlagsRegularExpression
|
|
31
|
+
const EscapeSequenceScanningFlagsReportErrors = scanner.EscapeSequenceScanningFlagsReportErrors
|
|
32
|
+
const EscapeSequenceScanningFlagsReportInvalidEscapeErrors = scanner.EscapeSequenceScanningFlagsReportInvalidEscapeErrors
|
|
33
|
+
const EscapeSequenceScanningFlagsString = scanner.EscapeSequenceScanningFlagsString
|
|
34
|
+
|
|
35
|
+
//go:linkname GetECMAEndLinePosition github.com/microsoft/typescript-go/internal/scanner.GetECMAEndLinePosition
|
|
36
|
+
func GetECMAEndLinePosition(sourceFile *ast.SourceFile, line int) int
|
|
37
|
+
|
|
38
|
+
//go:linkname GetECMALineAndByteOffsetOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineAndByteOffsetOfPosition
|
|
39
|
+
func GetECMALineAndByteOffsetOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, byteOffset int)
|
|
40
|
+
|
|
41
|
+
//go:linkname GetECMALineAndUTF16CharacterOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineAndUTF16CharacterOfPosition
|
|
42
|
+
func GetECMALineAndUTF16CharacterOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, character core.UTF16Offset)
|
|
43
|
+
|
|
44
|
+
//go:linkname GetECMALineOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineOfPosition
|
|
45
|
+
func GetECMALineOfPosition(sourceFile ast.SourceFileLike, pos int) int
|
|
46
|
+
|
|
47
|
+
//go:linkname GetECMALineStarts github.com/microsoft/typescript-go/internal/scanner.GetECMALineStarts
|
|
48
|
+
func GetECMALineStarts(sourceFile ast.SourceFileLike) []core.TextPos
|
|
49
|
+
|
|
50
|
+
//go:linkname GetECMAPositionOfLineAndByteOffset github.com/microsoft/typescript-go/internal/scanner.GetECMAPositionOfLineAndByteOffset
|
|
51
|
+
func GetECMAPositionOfLineAndByteOffset(sourceFile ast.SourceFileLike, line int, byteOffset int) int
|
|
52
|
+
|
|
53
|
+
//go:linkname GetECMAPositionOfLineAndUTF16Character github.com/microsoft/typescript-go/internal/scanner.GetECMAPositionOfLineAndUTF16Character
|
|
54
|
+
func GetECMAPositionOfLineAndUTF16Character(sourceFile ast.SourceFileLike, line int, character core.UTF16Offset) int
|
|
55
|
+
|
|
56
|
+
//go:linkname GetErrorRangeForNode github.com/microsoft/typescript-go/internal/scanner.GetErrorRangeForNode
|
|
57
|
+
func GetErrorRangeForNode(sourceFile *ast.SourceFile, node *ast.Node) core.TextRange
|
|
58
|
+
|
|
59
|
+
//go:linkname GetIdentifierToken github.com/microsoft/typescript-go/internal/scanner.GetIdentifierToken
|
|
60
|
+
func GetIdentifierToken(str string) ast.Kind
|
|
61
|
+
|
|
62
|
+
//go:linkname GetLeadingCommentRanges github.com/microsoft/typescript-go/internal/scanner.GetLeadingCommentRanges
|
|
63
|
+
func GetLeadingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange]
|
|
64
|
+
|
|
65
|
+
//go:linkname GetRangeOfTokenAtPosition github.com/microsoft/typescript-go/internal/scanner.GetRangeOfTokenAtPosition
|
|
66
|
+
func GetRangeOfTokenAtPosition(sourceFile *ast.SourceFile, pos int) core.TextRange
|
|
67
|
+
|
|
68
|
+
//go:linkname GetScannerForSourceFile github.com/microsoft/typescript-go/internal/scanner.GetScannerForSourceFile
|
|
69
|
+
func GetScannerForSourceFile(sourceFile *ast.SourceFile, pos int) *scanner.Scanner
|
|
70
|
+
|
|
71
|
+
//go:linkname GetShebang github.com/microsoft/typescript-go/internal/scanner.GetShebang
|
|
72
|
+
func GetShebang(text string) string
|
|
73
|
+
|
|
74
|
+
//go:linkname GetSourceTextOfNodeFromSourceFile github.com/microsoft/typescript-go/internal/scanner.GetSourceTextOfNodeFromSourceFile
|
|
75
|
+
func GetSourceTextOfNodeFromSourceFile(sourceFile *ast.SourceFile, node *ast.Node, includeTrivia bool) string
|
|
76
|
+
|
|
77
|
+
//go:linkname GetTextOfNode github.com/microsoft/typescript-go/internal/scanner.GetTextOfNode
|
|
78
|
+
func GetTextOfNode(node *ast.Node) string
|
|
79
|
+
|
|
80
|
+
//go:linkname GetTextOfNodeFromSourceText github.com/microsoft/typescript-go/internal/scanner.GetTextOfNodeFromSourceText
|
|
81
|
+
func GetTextOfNodeFromSourceText(sourceText string, node *ast.Node, includeTrivia bool) string
|
|
82
|
+
|
|
83
|
+
//go:linkname GetTokenPosOfNode github.com/microsoft/typescript-go/internal/scanner.GetTokenPosOfNode
|
|
84
|
+
func GetTokenPosOfNode(node *ast.Node, sourceFile *ast.SourceFile, includeJSDoc bool) int
|
|
85
|
+
|
|
86
|
+
//go:linkname GetTrailingCommentRanges github.com/microsoft/typescript-go/internal/scanner.GetTrailingCommentRanges
|
|
87
|
+
func GetTrailingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange]
|
|
88
|
+
|
|
89
|
+
//go:linkname GetViableKeywordSuggestions github.com/microsoft/typescript-go/internal/scanner.GetViableKeywordSuggestions
|
|
90
|
+
func GetViableKeywordSuggestions() []string
|
|
91
|
+
|
|
92
|
+
//go:linkname IdentifierToKeywordKind github.com/microsoft/typescript-go/internal/scanner.IdentifierToKeywordKind
|
|
93
|
+
func IdentifierToKeywordKind(node *ast.Identifier) ast.Kind
|
|
94
|
+
|
|
95
|
+
//go:linkname IsIdentifierPart github.com/microsoft/typescript-go/internal/scanner.IsIdentifierPart
|
|
96
|
+
func IsIdentifierPart(ch rune) bool
|
|
97
|
+
|
|
98
|
+
//go:linkname IsIdentifierPartEx github.com/microsoft/typescript-go/internal/scanner.IsIdentifierPartEx
|
|
99
|
+
func IsIdentifierPartEx(ch rune, languageVariant core.LanguageVariant) bool
|
|
100
|
+
|
|
101
|
+
//go:linkname IsIdentifierStart github.com/microsoft/typescript-go/internal/scanner.IsIdentifierStart
|
|
102
|
+
func IsIdentifierStart(ch rune) bool
|
|
103
|
+
|
|
104
|
+
//go:linkname IsIdentifierText github.com/microsoft/typescript-go/internal/scanner.IsIdentifierText
|
|
105
|
+
func IsIdentifierText(name string, languageVariant core.LanguageVariant) bool
|
|
106
|
+
|
|
107
|
+
//go:linkname IsIntrinsicJsxName github.com/microsoft/typescript-go/internal/scanner.IsIntrinsicJsxName
|
|
108
|
+
func IsIntrinsicJsxName(name string) bool
|
|
109
|
+
|
|
110
|
+
//go:linkname IsValidIdentifier github.com/microsoft/typescript-go/internal/scanner.IsValidIdentifier
|
|
111
|
+
func IsValidIdentifier(s string) bool
|
|
112
|
+
|
|
113
|
+
//go:linkname NewScanner github.com/microsoft/typescript-go/internal/scanner.NewScanner
|
|
114
|
+
func NewScanner() *scanner.Scanner
|
|
115
|
+
|
|
116
|
+
//go:linkname ScanTokenAtPosition github.com/microsoft/typescript-go/internal/scanner.ScanTokenAtPosition
|
|
117
|
+
func ScanTokenAtPosition(sourceFile *ast.SourceFile, pos int) ast.Kind
|
|
118
|
+
|
|
119
|
+
type Scanner = scanner.Scanner
|
|
120
|
+
type ScannerState = scanner.ScannerState
|
|
121
|
+
|
|
122
|
+
//go:linkname SkipTrivia github.com/microsoft/typescript-go/internal/scanner.SkipTrivia
|
|
123
|
+
func SkipTrivia(text string, pos int) int
|
|
124
|
+
|
|
125
|
+
//go:linkname SkipTriviaEx github.com/microsoft/typescript-go/internal/scanner.SkipTriviaEx
|
|
126
|
+
func SkipTriviaEx(text string, pos int, options *scanner.SkipTriviaOptions) int
|
|
127
|
+
|
|
128
|
+
type SkipTriviaOptions = scanner.SkipTriviaOptions
|
|
129
|
+
|
|
130
|
+
//go:linkname StringToToken github.com/microsoft/typescript-go/internal/scanner.StringToToken
|
|
131
|
+
func StringToToken(s string) ast.Kind
|
|
132
|
+
|
|
133
|
+
//go:linkname TokenToString github.com/microsoft/typescript-go/internal/scanner.TokenToString
|
|
134
|
+
func TokenToString(token ast.Kind) string
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// Code generated by packages/ttsc/tools/gen_shims. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
package tsoptions
|
|
4
|
+
|
|
5
|
+
import "github.com/microsoft/typescript-go/internal/ast"
|
|
6
|
+
import "github.com/microsoft/typescript-go/internal/collections"
|
|
7
|
+
import "github.com/microsoft/typescript-go/internal/core"
|
|
8
|
+
import "github.com/microsoft/typescript-go/internal/diagnostics"
|
|
9
|
+
import "github.com/microsoft/typescript-go/internal/tsoptions"
|
|
10
|
+
import "github.com/microsoft/typescript-go/internal/tspath"
|
|
11
|
+
import "reflect"
|
|
12
|
+
import _ "unsafe"
|
|
13
|
+
|
|
14
|
+
type AlternateModeDiagnostics = tsoptions.AlternateModeDiagnostics
|
|
15
|
+
|
|
16
|
+
var BuildNameMap = tsoptions.BuildNameMap
|
|
17
|
+
var BuildOpts = tsoptions.BuildOpts
|
|
18
|
+
var CommandLineCompilerOptionsMap = tsoptions.CommandLineCompilerOptionsMap
|
|
19
|
+
|
|
20
|
+
type CommandLineOption = tsoptions.CommandLineOption
|
|
21
|
+
type CommandLineOptionKind = tsoptions.CommandLineOptionKind
|
|
22
|
+
type CommandLineOptionNameMap = tsoptions.CommandLineOptionNameMap
|
|
23
|
+
|
|
24
|
+
const CommandLineOptionTypeBoolean = tsoptions.CommandLineOptionTypeBoolean
|
|
25
|
+
const CommandLineOptionTypeEnum = tsoptions.CommandLineOptionTypeEnum
|
|
26
|
+
const CommandLineOptionTypeList = tsoptions.CommandLineOptionTypeList
|
|
27
|
+
const CommandLineOptionTypeListOrElement = tsoptions.CommandLineOptionTypeListOrElement
|
|
28
|
+
const CommandLineOptionTypeNumber = tsoptions.CommandLineOptionTypeNumber
|
|
29
|
+
const CommandLineOptionTypeObject = tsoptions.CommandLineOptionTypeObject
|
|
30
|
+
const CommandLineOptionTypeString = tsoptions.CommandLineOptionTypeString
|
|
31
|
+
|
|
32
|
+
var CompilerNameMap = tsoptions.CompilerNameMap
|
|
33
|
+
|
|
34
|
+
//go:linkname CompilerOptionsAffectDeclarationPath github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectDeclarationPath
|
|
35
|
+
func CompilerOptionsAffectDeclarationPath(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool
|
|
36
|
+
|
|
37
|
+
//go:linkname CompilerOptionsAffectEmit github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectEmit
|
|
38
|
+
func CompilerOptionsAffectEmit(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool
|
|
39
|
+
|
|
40
|
+
//go:linkname CompilerOptionsAffectSemanticDiagnostics github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectSemanticDiagnostics
|
|
41
|
+
func CompilerOptionsAffectSemanticDiagnostics(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool
|
|
42
|
+
|
|
43
|
+
var CompilerOptionsDidYouMeanDiagnostics = tsoptions.CompilerOptionsDidYouMeanDiagnostics
|
|
44
|
+
|
|
45
|
+
type CompilerOptionsValue = tsoptions.CompilerOptionsValue
|
|
46
|
+
|
|
47
|
+
//go:linkname ConvertOptionToAbsolutePath github.com/microsoft/typescript-go/internal/tsoptions.ConvertOptionToAbsolutePath
|
|
48
|
+
func ConvertOptionToAbsolutePath(o string, v any, optionMap tsoptions.CommandLineOptionNameMap, cwd string) (any, bool)
|
|
49
|
+
|
|
50
|
+
//go:linkname ConvertToTSConfig github.com/microsoft/typescript-go/internal/tsoptions.ConvertToTSConfig
|
|
51
|
+
func ConvertToTSConfig(configParseResult *tsoptions.ParsedCommandLine, configFileName string) *tsoptions.TSConfig
|
|
52
|
+
|
|
53
|
+
//go:linkname CreateDiagnosticAtReferenceSyntax github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticAtReferenceSyntax
|
|
54
|
+
func CreateDiagnosticAtReferenceSyntax(config *tsoptions.ParsedCommandLine, index int, message *diagnostics.Message, args ...any) *ast.Diagnostic
|
|
55
|
+
|
|
56
|
+
//go:linkname CreateDiagnosticForNodeInSourceFile github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticForNodeInSourceFile
|
|
57
|
+
func CreateDiagnosticForNodeInSourceFile(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic
|
|
58
|
+
|
|
59
|
+
//go:linkname CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic
|
|
60
|
+
func CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic
|
|
61
|
+
|
|
62
|
+
type DidYouMeanOptionsDiagnostics = tsoptions.DidYouMeanOptionsDiagnostics
|
|
63
|
+
type ExtendedConfigCache = tsoptions.ExtendedConfigCache
|
|
64
|
+
type ExtendedConfigCacheEntry = tsoptions.ExtendedConfigCacheEntry
|
|
65
|
+
type FileExtensionInfo = tsoptions.FileExtensionInfo
|
|
66
|
+
|
|
67
|
+
//go:linkname ForEachCompilerOptionValue github.com/microsoft/typescript-go/internal/tsoptions.ForEachCompilerOptionValue
|
|
68
|
+
func ForEachCompilerOptionValue(options *core.CompilerOptions, declFilter func(*tsoptions.CommandLineOption) bool, fn func(option *tsoptions.CommandLineOption, value reflect.Value, i int) bool) bool
|
|
69
|
+
|
|
70
|
+
//go:linkname GetCallbackForFindingPropertyAssignmentByValue github.com/microsoft/typescript-go/internal/tsoptions.GetCallbackForFindingPropertyAssignmentByValue
|
|
71
|
+
func GetCallbackForFindingPropertyAssignmentByValue(value string) func(property *ast.PropertyAssignment) *ast.Node
|
|
72
|
+
|
|
73
|
+
//go:linkname GetDefaultLibFileName github.com/microsoft/typescript-go/internal/tsoptions.GetDefaultLibFileName
|
|
74
|
+
func GetDefaultLibFileName(options *core.CompilerOptions) string
|
|
75
|
+
|
|
76
|
+
//go:linkname GetLibFileName github.com/microsoft/typescript-go/internal/tsoptions.GetLibFileName
|
|
77
|
+
func GetLibFileName(libName string) (string, bool)
|
|
78
|
+
|
|
79
|
+
//go:linkname GetNameMapFromList github.com/microsoft/typescript-go/internal/tsoptions.GetNameMapFromList
|
|
80
|
+
func GetNameMapFromList(optDecls []*tsoptions.CommandLineOption) *tsoptions.NameMap
|
|
81
|
+
|
|
82
|
+
//go:linkname GetOptionsSyntaxByArrayElementValue github.com/microsoft/typescript-go/internal/tsoptions.GetOptionsSyntaxByArrayElementValue
|
|
83
|
+
func GetOptionsSyntaxByArrayElementValue(objectLiteral *ast.ObjectLiteralExpression, propKey string, elementValue string) *ast.Node
|
|
84
|
+
|
|
85
|
+
//go:linkname GetParsedCommandLineOfConfigFile github.com/microsoft/typescript-go/internal/tsoptions.GetParsedCommandLineOfConfigFile
|
|
86
|
+
func GetParsedCommandLineOfConfigFile(configFileName string, options *core.CompilerOptions, optionsRaw *collections.OrderedMap[string, any], sys tsoptions.ParseConfigHost, extendedConfigCache tsoptions.ExtendedConfigCache) (*tsoptions.ParsedCommandLine, []*ast.Diagnostic)
|
|
87
|
+
|
|
88
|
+
//go:linkname GetParsedCommandLineOfConfigFilePath github.com/microsoft/typescript-go/internal/tsoptions.GetParsedCommandLineOfConfigFilePath
|
|
89
|
+
func GetParsedCommandLineOfConfigFilePath(configFileName string, path tspath.Path, options *core.CompilerOptions, optionsRaw *collections.OrderedMap[string, any], sys tsoptions.ParseConfigHost, extendedConfigCache tsoptions.ExtendedConfigCache) (*tsoptions.ParsedCommandLine, []*ast.Diagnostic)
|
|
90
|
+
|
|
91
|
+
//go:linkname GetSupportedExtensions github.com/microsoft/typescript-go/internal/tsoptions.GetSupportedExtensions
|
|
92
|
+
func GetSupportedExtensions(compilerOptions *core.CompilerOptions, extraFileExtensions []tsoptions.FileExtensionInfo) [][]string
|
|
93
|
+
|
|
94
|
+
//go:linkname GetSupportedExtensionsWithJsonIfResolveJsonModule github.com/microsoft/typescript-go/internal/tsoptions.GetSupportedExtensionsWithJsonIfResolveJsonModule
|
|
95
|
+
func GetSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions *core.CompilerOptions, supportedExtensions [][]string) [][]string
|
|
96
|
+
|
|
97
|
+
//go:linkname GetTsConfigPropArrayElementValue github.com/microsoft/typescript-go/internal/tsoptions.GetTsConfigPropArrayElementValue
|
|
98
|
+
func GetTsConfigPropArrayElementValue(tsConfigSourceFile *ast.SourceFile, propKey string, elementValue string) *ast.StringLiteral
|
|
99
|
+
|
|
100
|
+
var LibFilesSet = tsoptions.LibFilesSet
|
|
101
|
+
var LibMap = tsoptions.LibMap
|
|
102
|
+
var Libs = tsoptions.Libs
|
|
103
|
+
|
|
104
|
+
type NameMap = tsoptions.NameMap
|
|
105
|
+
|
|
106
|
+
//go:linkname NewParsedCommandLine github.com/microsoft/typescript-go/internal/tsoptions.NewParsedCommandLine
|
|
107
|
+
func NewParsedCommandLine(compilerOptions *core.CompilerOptions, rootFileNames []string, comparePathsOptions tspath.ComparePathsOptions) *tsoptions.ParsedCommandLine
|
|
108
|
+
|
|
109
|
+
//go:linkname NewTsconfigSourceFileFromFilePath github.com/microsoft/typescript-go/internal/tsoptions.NewTsconfigSourceFileFromFilePath
|
|
110
|
+
func NewTsconfigSourceFileFromFilePath(configFileName string, configPath tspath.Path, configSourceText string) *tsoptions.TsConfigSourceFile
|
|
111
|
+
|
|
112
|
+
var OptionsDeclarations = tsoptions.OptionsDeclarations
|
|
113
|
+
var OptionsForBuild = tsoptions.OptionsForBuild
|
|
114
|
+
var OptionsForWatch = tsoptions.OptionsForWatch
|
|
115
|
+
|
|
116
|
+
//go:linkname ParseBuildCommandLine github.com/microsoft/typescript-go/internal/tsoptions.ParseBuildCommandLine
|
|
117
|
+
func ParseBuildCommandLine(commandLine []string, host tsoptions.ParseConfigHost) *tsoptions.ParsedBuildCommandLine
|
|
118
|
+
|
|
119
|
+
//go:linkname ParseBuildOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseBuildOptions
|
|
120
|
+
func ParseBuildOptions(key string, value any, allOptions *core.BuildOptions) []*ast.Diagnostic
|
|
121
|
+
|
|
122
|
+
//go:linkname ParseCommandLine github.com/microsoft/typescript-go/internal/tsoptions.ParseCommandLine
|
|
123
|
+
func ParseCommandLine(commandLine []string, host tsoptions.ParseConfigHost) *tsoptions.ParsedCommandLine
|
|
124
|
+
|
|
125
|
+
type ParseCommandLineWorkerDiagnostics = tsoptions.ParseCommandLineWorkerDiagnostics
|
|
126
|
+
|
|
127
|
+
//go:linkname ParseCompilerOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseCompilerOptions
|
|
128
|
+
func ParseCompilerOptions(key string, value any, allOptions *core.CompilerOptions) []*ast.Diagnostic
|
|
129
|
+
|
|
130
|
+
//go:linkname ParseConfigFileTextToJson github.com/microsoft/typescript-go/internal/tsoptions.ParseConfigFileTextToJson
|
|
131
|
+
func ParseConfigFileTextToJson(fileName string, path tspath.Path, jsonText string) (any, []*ast.Diagnostic)
|
|
132
|
+
|
|
133
|
+
type ParseConfigHost = tsoptions.ParseConfigHost
|
|
134
|
+
|
|
135
|
+
//go:linkname ParseExtendedConfig github.com/microsoft/typescript-go/internal/tsoptions.ParseExtendedConfig
|
|
136
|
+
func ParseExtendedConfig(fileName string, path tspath.Path, resolutionStack []string, host tsoptions.ParseConfigHost, extendedConfigCache tsoptions.ExtendedConfigCache) *tsoptions.ExtendedConfigCacheEntry
|
|
137
|
+
|
|
138
|
+
//go:linkname ParseJsonConfigFileContent github.com/microsoft/typescript-go/internal/tsoptions.ParseJsonConfigFileContent
|
|
139
|
+
func ParseJsonConfigFileContent(json any, host tsoptions.ParseConfigHost, basePath string, existingOptions *core.CompilerOptions, configFileName string, resolutionStack []tspath.Path, extraFileExtensions []tsoptions.FileExtensionInfo, extendedConfigCache tsoptions.ExtendedConfigCache) *tsoptions.ParsedCommandLine
|
|
140
|
+
|
|
141
|
+
//go:linkname ParseJsonSourceFileConfigFileContent github.com/microsoft/typescript-go/internal/tsoptions.ParseJsonSourceFileConfigFileContent
|
|
142
|
+
func ParseJsonSourceFileConfigFileContent(sourceFile *tsoptions.TsConfigSourceFile, host tsoptions.ParseConfigHost, basePath string, existingOptions *core.CompilerOptions, existingOptionsRaw *collections.OrderedMap[string, any], configFileName string, resolutionStack []tspath.Path, extraFileExtensions []tsoptions.FileExtensionInfo, extendedConfigCache tsoptions.ExtendedConfigCache) *tsoptions.ParsedCommandLine
|
|
143
|
+
|
|
144
|
+
//go:linkname ParseListTypeOption github.com/microsoft/typescript-go/internal/tsoptions.ParseListTypeOption
|
|
145
|
+
func ParseListTypeOption(opt *tsoptions.CommandLineOption, value string) ([]any, []*ast.Diagnostic)
|
|
146
|
+
|
|
147
|
+
//go:linkname ParseString github.com/microsoft/typescript-go/internal/tsoptions.ParseString
|
|
148
|
+
func ParseString(value any) string
|
|
149
|
+
|
|
150
|
+
//go:linkname ParseStringArray github.com/microsoft/typescript-go/internal/tsoptions.ParseStringArray
|
|
151
|
+
func ParseStringArray(value any) []string
|
|
152
|
+
|
|
153
|
+
//go:linkname ParseTristate github.com/microsoft/typescript-go/internal/tsoptions.ParseTristate
|
|
154
|
+
func ParseTristate(value any) core.Tristate
|
|
155
|
+
|
|
156
|
+
//go:linkname ParseTypeAcquisition github.com/microsoft/typescript-go/internal/tsoptions.ParseTypeAcquisition
|
|
157
|
+
func ParseTypeAcquisition(key string, value any, allOptions *core.TypeAcquisition) []*ast.Diagnostic
|
|
158
|
+
|
|
159
|
+
//go:linkname ParseWatchOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseWatchOptions
|
|
160
|
+
func ParseWatchOptions(key string, value any, allOptions *core.WatchOptions) []*ast.Diagnostic
|
|
161
|
+
|
|
162
|
+
type ParsedBuildCommandLine = tsoptions.ParsedBuildCommandLine
|
|
163
|
+
type ParsedCommandLine = tsoptions.ParsedCommandLine
|
|
164
|
+
type SourceOutputAndProjectReference = tsoptions.SourceOutputAndProjectReference
|
|
165
|
+
type TSConfig = tsoptions.TSConfig
|
|
166
|
+
|
|
167
|
+
//go:linkname TargetToLibMap github.com/microsoft/typescript-go/internal/tsoptions.TargetToLibMap
|
|
168
|
+
func TargetToLibMap() map[core.ScriptTarget]string
|
|
169
|
+
|
|
170
|
+
type TsConfigSourceFile = tsoptions.TsConfigSourceFile
|
|
171
|
+
|
|
172
|
+
var TscBuildOption = tsoptions.TscBuildOption
|
|
173
|
+
var WatchNameMap = tsoptions.WatchNameMap
|