@ttsc/wasm 0.27.0 → 0.28.0
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.
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"identity": "
|
|
3
|
+
"identity": "8e448ff45b7e1fd1f9f1b6d1d5ee3dc0fcf4de96a5d93f1faf71df266043ca9b",
|
|
4
4
|
"artifacts": [
|
|
5
5
|
{
|
|
6
6
|
"path": "/home/runner/work/ttsc/ttsc/packages/wasm/dist/ttsc.wasm",
|
|
7
7
|
"type": "file",
|
|
8
|
-
"sha256": "
|
|
8
|
+
"sha256": "a75af10a10f8d6e1c951414460c63e7ab398d0f5c283d3fbedcd44d2fada506d"
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "/home/runner/work/ttsc/ttsc/packages/wasm/dist/wasm_exec.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"path": "ast/parent.go",
|
|
46
|
-
"sha256": "
|
|
46
|
+
"sha256": "8ec407ee63e9a172cd1bcbd717c2b326ce2d3bbbc7301b3544c67f6b046bf597"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"path": "ast/safe_text.go",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"path": "checker/enums_gen.go",
|
|
106
|
-
"sha256": "
|
|
106
|
+
"sha256": "5c2abe63676104fdeb78cd8e7064cd87bd79585b29e73a07b445db7b14725875"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"path": "checker/extra-shim.json",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
},
|
|
120
120
|
{
|
|
121
121
|
"path": "checker/shim.go",
|
|
122
|
-
"sha256": "
|
|
122
|
+
"sha256": "e4b4251860e180532a2eef5965e61d0843a6078cebefdd388c98119ebf451dc1"
|
|
123
123
|
},
|
|
124
124
|
{
|
|
125
125
|
"path": "compiler/emit_sourcemap.go",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
"path": "compiler/emithook.go",
|
|
134
|
-
"sha256": "
|
|
134
|
+
"sha256": "1539525a78d9369c5c692c9a62514395b3ac8e905e4e923e215855dcb7191d00"
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
"path": "compiler/extra-shim.json",
|
package/dist/ttsc.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -6,9 +6,17 @@ import innerast "github.com/microsoft/typescript-go/internal/ast"
|
|
|
6
6
|
// its containing node.
|
|
7
7
|
//
|
|
8
8
|
// A transform that splices freshly built (synthetic) nodes onto a SourceFile
|
|
9
|
-
// must call this before emit
|
|
10
|
-
//
|
|
11
|
-
//
|
|
9
|
+
// must call this before emit, because the passes that then walk the spliced tree
|
|
10
|
+
// dereference Parent and would hit nil on a synthetic node. The printer is the
|
|
11
|
+
// example that holds up: getContainingNodeArray reads node.Parent unguarded for
|
|
12
|
+
// a parameter, template span, decorator, and heritage clause.
|
|
13
|
+
//
|
|
14
|
+
// Two earlier examples were dropped rather than the rule. The emit resolver's
|
|
15
|
+
// reference marking no longer walks the spliced tree at all in ttsc's plugin
|
|
16
|
+
// emit lane, which builds the builtin chain from the parse tree (see
|
|
17
|
+
// driver.EmitWithPluginTransformers). The module transform's own Parent reads
|
|
18
|
+
// carry upstream //nolint:customlint notes saying they deliberately inspect
|
|
19
|
+
// parse-tree parents.
|
|
12
20
|
func SetParentInChildren(node *Node) {
|
|
13
21
|
innerast.SetParentInChildren(node)
|
|
14
22
|
}
|
|
@@ -20,6 +28,11 @@ func SetParentInChildren(node *Node) {
|
|
|
20
28
|
// kept verbatim while sibling statements were rewritten) makes tsgo's
|
|
21
29
|
// runtime-syntax/printer mis-resolve the declaration and drop it from emit.
|
|
22
30
|
// Only freshly built (synthetic) nodes need a parent wired, and those start nil.
|
|
31
|
+
//
|
|
32
|
+
// This is the form ttsc's plugin emit lane calls. How much it currently carries
|
|
33
|
+
// is unproven: stubbing the call out leaves the whole driver suite green, which
|
|
34
|
+
// measures the suite's coverage of parent-dependent emit rather than the hazard.
|
|
35
|
+
// Keep it for the reason above, not on the strength of a failing test.
|
|
23
36
|
func SetParentInChildrenUnset(node *Node) {
|
|
24
37
|
node.ForEachChild(func(child *Node) bool {
|
|
25
38
|
if child.Parent == nil {
|
|
@@ -77,6 +77,17 @@ const (
|
|
|
77
77
|
ObjectFlagsSingleSignatureType = innerchecker.ObjectFlagsSingleSignatureType
|
|
78
78
|
ObjectFlagsTuple = innerchecker.ObjectFlagsTuple
|
|
79
79
|
ObjectFlagsUnresolvedMembers = innerchecker.ObjectFlagsUnresolvedMembers
|
|
80
|
+
SignatureFlagsCallChainFlags = innerchecker.SignatureFlagsCallChainFlags
|
|
81
|
+
SignatureFlagsConstruct = innerchecker.SignatureFlagsConstruct
|
|
82
|
+
SignatureFlagsHasLiteralTypes = innerchecker.SignatureFlagsHasLiteralTypes
|
|
83
|
+
SignatureFlagsHasRestParameter = innerchecker.SignatureFlagsHasRestParameter
|
|
84
|
+
SignatureFlagsIsInnerCallChain = innerchecker.SignatureFlagsIsInnerCallChain
|
|
85
|
+
SignatureFlagsIsNonInferrable = innerchecker.SignatureFlagsIsNonInferrable
|
|
86
|
+
SignatureFlagsIsOuterCallChain = innerchecker.SignatureFlagsIsOuterCallChain
|
|
87
|
+
SignatureFlagsIsSignatureCandidateForOverloadFailure = innerchecker.SignatureFlagsIsSignatureCandidateForOverloadFailure
|
|
88
|
+
SignatureFlagsIsUntypedSignatureInJSFile = innerchecker.SignatureFlagsIsUntypedSignatureInJSFile
|
|
89
|
+
SignatureFlagsNone = innerchecker.SignatureFlagsNone
|
|
90
|
+
SignatureFlagsPropagatingFlags = innerchecker.SignatureFlagsPropagatingFlags
|
|
80
91
|
SignatureKindConstruct = innerchecker.SignatureKindConstruct
|
|
81
92
|
TypeFlagsAnyOrUnknown = innerchecker.TypeFlagsAnyOrUnknown
|
|
82
93
|
TypeFlagsBigInt = innerchecker.TypeFlagsBigInt
|
|
@@ -20,6 +20,7 @@ import (
|
|
|
20
20
|
type Checker = innerchecker.Checker
|
|
21
21
|
type IndexInfo = innerchecker.IndexInfo
|
|
22
22
|
type Signature = innerchecker.Signature
|
|
23
|
+
type SignatureFlags = innerchecker.SignatureFlags
|
|
23
24
|
type SignatureKind = innerchecker.SignatureKind
|
|
24
25
|
type Type = innerchecker.Type
|
|
25
26
|
type TypeMapper = innerchecker.TypeMapper
|
|
@@ -216,6 +217,8 @@ func Checker_isSymbolAccessibleAsValue(recv *innerchecker.Checker, symbol *inner
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
const (
|
|
220
|
+
SignatureFlagsAbstract = innerchecker.SignatureFlagsAbstract
|
|
221
|
+
|
|
219
222
|
SignatureKindCall = innerchecker.SignatureKindCall
|
|
220
223
|
|
|
221
224
|
TypeMapperKindUnknown = innerchecker.TypeMapperKindUnknown
|
|
@@ -18,5 +18,15 @@ import (
|
|
|
18
18
|
// (type-erase, import-elision, runtime-syntax, module-transform, ...) for one
|
|
19
19
|
// source file, linked from the internal package via go:linkname.
|
|
20
20
|
//
|
|
21
|
+
// `sourceFile` is the marking target, not the file that gets transformed.
|
|
22
|
+
// Upstream reads it for two per-file constants (in-JS-file, JSX language
|
|
23
|
+
// variant) and then hands it to emitResolver.MarkLinkedReferencesRecursively,
|
|
24
|
+
// whose marks the import-elision transformer later reads back through
|
|
25
|
+
// EmitContext.ParseNode. A caller that runs a plugin pass first must therefore
|
|
26
|
+
// pass the PARSE tree here and the transformed tree to TransformSourceFile;
|
|
27
|
+
// upstream's own emitter passes one file to both only because it has nothing in
|
|
28
|
+
// between. Re-check this when the pin moves: a new use of the parameter inside
|
|
29
|
+
// getScriptTransformers could make the two roles diverge further.
|
|
30
|
+
//
|
|
21
31
|
//go:linkname GetScriptTransformers github.com/microsoft/typescript-go/internal/compiler.getScriptTransformers
|
|
22
32
|
func GetScriptTransformers(emitContext *innerprinter.EmitContext, host innerprinter.EmitHost, sourceFile *innerast.SourceFile) []*innertransformers.Transformer
|