typia 13.0.0-dev.20260502-2 → 13.0.0-dev.20260506
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/native/core/programmers/json/JsonStringifyProgrammer.go +1 -1
- package/native/core/programmers/misc/MiscCloneProgrammer.go +3 -3
- package/native/core/programmers/misc/MiscPruneProgrammer.go +1 -1
- package/native/shim/printer/go.mod +1 -1
- package/native/third_party/ttsc/driver/host.go +2 -2
- package/native/third_party/ttsc/driver/program.go +69 -6
- package/native/third_party/ttsc/driver/rewrite.go +28 -2
- package/native/third_party/ttsc/go.mod +5 -3
- package/native/third_party/ttsc/go.sum +2 -2
- package/native/third_party/ttsc/shim/ast/go.mod +1 -1
- package/native/third_party/ttsc/shim/ast/lint.go +3 -0
- package/native/third_party/ttsc/shim/ast/shim.go +5 -4
- package/native/third_party/ttsc/shim/bundled/go.mod +1 -1
- package/native/third_party/ttsc/shim/checker/go.mod +1 -1
- package/native/third_party/ttsc/shim/compiler/go.mod +1 -1
- package/native/third_party/ttsc/shim/core/go.mod +1 -1
- package/native/third_party/ttsc/shim/core/shim.go +3 -0
- package/native/third_party/ttsc/shim/diagnosticwriter/go.mod +1 -1
- package/native/third_party/ttsc/shim/parser/go.mod +1 -1
- package/native/third_party/ttsc/shim/scanner/go.mod +1 -1
- package/native/third_party/ttsc/shim/tsoptions/go.mod +1 -1
- package/native/third_party/ttsc/shim/tspath/go.mod +1 -1
- package/native/third_party/ttsc/shim/vfs/cachedvfs/go.mod +1 -1
- package/native/third_party/ttsc/shim/vfs/go.mod +1 -1
- package/native/third_party/ttsc/shim/vfs/osvfs/go.mod +1 -1
- package/package.json +5 -5
|
@@ -949,7 +949,7 @@ func jsonStringifyProgrammer_explore_arrays(props jsonStringifyProgrammer_explor
|
|
|
949
949
|
return nativeprogrammers.IsProgrammer.Decode(nativeprogrammers.IsProgrammer_DecodeProps{
|
|
950
950
|
Context: props.Context,
|
|
951
951
|
Functor: props.Functor,
|
|
952
|
-
Metadata: v.Definition.(*schemametadata.
|
|
952
|
+
Metadata: v.Definition.(*schemametadata.MetadataSchema),
|
|
953
953
|
Input: v.Input,
|
|
954
954
|
Explore: jsonStringifyProgrammer_checker_explore(v.Explore),
|
|
955
955
|
})
|
|
@@ -643,7 +643,7 @@ func miscCloneProgrammer_explore_arrays(props miscCloneProgrammer_exploreArraysP
|
|
|
643
643
|
Context: props.Context,
|
|
644
644
|
Functor: props.Functor,
|
|
645
645
|
Input: v.Input,
|
|
646
|
-
Metadata: v.Definition.(*schemametadata.
|
|
646
|
+
Metadata: v.Definition.(*schemametadata.MetadataSchema),
|
|
647
647
|
Explore: miscCloneProgrammer_checker_explore(v.Explore),
|
|
648
648
|
})
|
|
649
649
|
},
|
|
@@ -697,7 +697,7 @@ func miscCloneProgrammer_explore_sets(props miscCloneProgrammer_exploreSetsProps
|
|
|
697
697
|
Context: props.Context,
|
|
698
698
|
Functor: props.Functor,
|
|
699
699
|
Input: v.Input,
|
|
700
|
-
Metadata: v.Definition.(*schemametadata.
|
|
700
|
+
Metadata: v.Definition.(*schemametadata.MetadataSchema),
|
|
701
701
|
Explore: miscCloneProgrammer_checker_explore(v.Explore),
|
|
702
702
|
})
|
|
703
703
|
},
|
|
@@ -757,7 +757,7 @@ func miscCloneProgrammer_explore_maps(props miscCloneProgrammer_exploreMapsProps
|
|
|
757
757
|
nativehelpers.UnionExplorer.Map(nativehelpers.UnionExplorer_MapProps{
|
|
758
758
|
Config: nativehelpers.UnionExplorer_ArrayLikeConfig{
|
|
759
759
|
Checker: func(v nativehelpers.UnionExplorer_ArrayLikeCheckerProps) *shimast.Node {
|
|
760
|
-
pair := v.Definition.(*schemametadata.
|
|
760
|
+
pair := v.Definition.([]*schemametadata.MetadataSchema)
|
|
761
761
|
first := nativeprogrammers.IsProgrammer.Decode(nativeprogrammers.IsProgrammer_DecodeProps{
|
|
762
762
|
Context: props.Context,
|
|
763
763
|
Functor: props.Functor,
|
|
@@ -527,7 +527,7 @@ func miscPruneProgrammer_explore_arrays(props miscPruneProgrammer_exploreArraysP
|
|
|
527
527
|
Context: props.Context,
|
|
528
528
|
Functor: props.Functor,
|
|
529
529
|
Input: v.Input,
|
|
530
|
-
Metadata: v.Definition.(*schemametadata.
|
|
530
|
+
Metadata: v.Definition.(*schemametadata.MetadataSchema),
|
|
531
531
|
Explore: miscCloneProgrammer_checker_explore(v.Explore),
|
|
532
532
|
})
|
|
533
533
|
},
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
//
|
|
6
6
|
// Structural note: this file is deliberately adapted from tsgonest's
|
|
7
7
|
// `internal/compiler/host.go` (MIT, github.com/tsgonest/tsgonest).
|
|
8
|
-
// The helper surface is the same
|
|
9
|
-
//
|
|
8
|
+
// The helper surface is the same because both hosts need the same bundled-lib
|
|
9
|
+
// filesystem and CompilerHost construction.
|
|
10
10
|
package driver
|
|
11
11
|
|
|
12
12
|
import (
|
|
@@ -6,6 +6,8 @@ import (
|
|
|
6
6
|
"fmt"
|
|
7
7
|
"io"
|
|
8
8
|
"path/filepath"
|
|
9
|
+
"strings"
|
|
10
|
+
"time"
|
|
9
11
|
|
|
10
12
|
"github.com/microsoft/typescript-go/shim/ast"
|
|
11
13
|
shimchecker "github.com/microsoft/typescript-go/shim/checker"
|
|
@@ -30,6 +32,9 @@ type Diagnostic struct {
|
|
|
30
32
|
File string
|
|
31
33
|
Line int
|
|
32
34
|
Column int
|
|
35
|
+
Code int32
|
|
36
|
+
Start *int
|
|
37
|
+
Length *int
|
|
33
38
|
Message string
|
|
34
39
|
Severity Severity
|
|
35
40
|
raw *ast.Diagnostic
|
|
@@ -72,6 +77,7 @@ func NewLintDiagnostic(
|
|
|
72
77
|
}
|
|
73
78
|
lint := shimdiagnosticwriter.NewLintDiagnostic(file, pos, end, code, cat, message)
|
|
74
79
|
d := Diagnostic{
|
|
80
|
+
Code: code,
|
|
75
81
|
Message: message,
|
|
76
82
|
Severity: severity,
|
|
77
83
|
lint: lint,
|
|
@@ -79,6 +85,9 @@ func NewLintDiagnostic(
|
|
|
79
85
|
if file != nil {
|
|
80
86
|
d.File = file.FileName()
|
|
81
87
|
if pos >= 0 {
|
|
88
|
+
length := end - pos
|
|
89
|
+
d.Start = &pos
|
|
90
|
+
d.Length = &length
|
|
82
91
|
line, col := shimscanner.GetECMALineAndByteOffsetOfPosition(file, pos)
|
|
83
92
|
d.Line = line + 1
|
|
84
93
|
d.Column = col + 1
|
|
@@ -187,12 +196,13 @@ type Program struct {
|
|
|
187
196
|
}
|
|
188
197
|
|
|
189
198
|
// LoadProgramOptions controls tsconfig overrides applied before tsgo creates
|
|
190
|
-
// the program. `ForceEmit` is used by `ttsc --emit` and
|
|
191
|
-
// so
|
|
199
|
+
// the program. `ForceEmit` is used by `ttsc --emit` and runtime compilation
|
|
200
|
+
// so execution still works when the project defaults to `noEmit`.
|
|
192
201
|
type LoadProgramOptions struct {
|
|
193
|
-
ForceEmit
|
|
194
|
-
ForceNoEmit
|
|
195
|
-
OutDir
|
|
202
|
+
ForceEmit bool
|
|
203
|
+
ForceNoEmit bool
|
|
204
|
+
OutDir string
|
|
205
|
+
SourcePreamble string
|
|
196
206
|
}
|
|
197
207
|
|
|
198
208
|
// Close releases the checker pool lease acquired by LoadProgram.
|
|
@@ -256,6 +266,12 @@ func LoadProgram(cwd, tsconfigPath string, options LoadProgramOptions) (*Program
|
|
|
256
266
|
}
|
|
257
267
|
cwd = tspath.ResolvePath(cwd)
|
|
258
268
|
fs := DefaultFS()
|
|
269
|
+
if options.SourcePreamble != "" {
|
|
270
|
+
fs = sourcePreambleFS{
|
|
271
|
+
FS: fs,
|
|
272
|
+
preamble: options.SourcePreamble,
|
|
273
|
+
}
|
|
274
|
+
}
|
|
259
275
|
host := DefaultHost(cwd, fs)
|
|
260
276
|
|
|
261
277
|
parsed, diags, err := ParseTSConfig(fs, cwd, tsconfigPath, host)
|
|
@@ -317,6 +333,50 @@ func overrideOutDir(cwd string, parsed *tsoptions.ParsedCommandLine, outDir stri
|
|
|
317
333
|
parsed.ParsedConfig.CompilerOptions.OutDir = tspath.ResolvePath(cwd, outDir)
|
|
318
334
|
}
|
|
319
335
|
|
|
336
|
+
type sourcePreambleFS struct {
|
|
337
|
+
vfs.FS
|
|
338
|
+
preamble string
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
func (fs sourcePreambleFS) ReadFile(filePath string) (string, bool) {
|
|
342
|
+
contents, ok := fs.FS.ReadFile(filePath)
|
|
343
|
+
if !ok || !isSourcePreambleTarget(filePath) {
|
|
344
|
+
return contents, ok
|
|
345
|
+
}
|
|
346
|
+
return fs.preamble + contents, true
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
func (fs sourcePreambleFS) WriteFile(filePath string, data string) error {
|
|
350
|
+
return fs.FS.WriteFile(filePath, data)
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
func (fs sourcePreambleFS) AppendFile(filePath string, data string) error {
|
|
354
|
+
return fs.FS.AppendFile(filePath, data)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
func (fs sourcePreambleFS) Remove(filePath string) error {
|
|
358
|
+
return fs.FS.Remove(filePath)
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
func (fs sourcePreambleFS) Chtimes(filePath string, aTime time.Time, mTime time.Time) error {
|
|
362
|
+
return fs.FS.Chtimes(filePath, aTime, mTime)
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
func isSourcePreambleTarget(filePath string) bool {
|
|
366
|
+
lower := strings.ToLower(filepath.ToSlash(filePath))
|
|
367
|
+
for _, suffix := range []string{".d.ts", ".d.mts", ".d.cts"} {
|
|
368
|
+
if strings.HasSuffix(lower, suffix) {
|
|
369
|
+
return false
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
for _, suffix := range []string{".ts", ".tsx", ".mts", ".cts", ".js", ".jsx", ".mjs", ".cjs"} {
|
|
373
|
+
if strings.HasSuffix(lower, suffix) {
|
|
374
|
+
return true
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return false
|
|
378
|
+
}
|
|
379
|
+
|
|
320
380
|
// SourceFiles exposes the program's user-authored source files (declaration
|
|
321
381
|
// files filtered out).
|
|
322
382
|
func (p *Program) SourceFiles() []*ast.SourceFile {
|
|
@@ -388,10 +448,13 @@ func convertDiagnostics(in []*ast.Diagnostic) []Diagnostic {
|
|
|
388
448
|
if d == nil {
|
|
389
449
|
continue
|
|
390
450
|
}
|
|
391
|
-
diag := Diagnostic{Message: d.String(), raw: d}
|
|
451
|
+
diag := Diagnostic{Code: d.Code(), Message: d.String(), raw: d}
|
|
392
452
|
if file := d.File(); file != nil {
|
|
393
453
|
diag.File = file.FileName()
|
|
394
454
|
if pos := d.Pos(); pos >= 0 {
|
|
455
|
+
length := d.Len()
|
|
456
|
+
diag.Start = &pos
|
|
457
|
+
diag.Length = &length
|
|
395
458
|
line, col := shimscanner.GetECMALineAndByteOffsetOfPosition(file, pos)
|
|
396
459
|
diag.Line = line + 1
|
|
397
460
|
diag.Column = col + 1
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// tsgo emits `.js` with plugin-owned call expressions preserved as-is because
|
|
4
4
|
// the compile-time transformer stage is now hosted outside the native
|
|
5
5
|
// compiler. This file implements the emit-time rewrite pattern pioneered by
|
|
6
|
-
// tsgonest: we
|
|
6
|
+
// tsgonest: we intercept tsgo's Emit() via its WriteFile callback, locate each
|
|
7
7
|
// previously-recognized plugin call in the emitted JS, and replace the call
|
|
8
8
|
// expression with the JS the native consumer produced.
|
|
9
9
|
//
|
|
@@ -75,6 +75,26 @@ func (p *Program) EmitAll(rs *RewriteSet, writeFile shimcompiler.WriteFile) (*sh
|
|
|
75
75
|
return p.emit(rs, nil, writeFile)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
// EmitAllRaw runs TypeScript-Go emit without ttsc output-text rewrites.
|
|
79
|
+
func (p *Program) EmitAllRaw(writeFile shimcompiler.WriteFile) (*shimcompiler.EmitResult, []Diagnostic, error) {
|
|
80
|
+
if p == nil || p.TSProgram == nil {
|
|
81
|
+
return nil, nil, errors.New("driver: nil program")
|
|
82
|
+
}
|
|
83
|
+
wf := writeFile
|
|
84
|
+
if wf == nil {
|
|
85
|
+
wf = func(fileName, text string, data *shimcompiler.WriteFileData) error {
|
|
86
|
+
return DefaultWriteFile(fileName, text)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
result := p.TSProgram.Emit(context.Background(), shimcompiler.EmitOptions{
|
|
90
|
+
WriteFile: wf,
|
|
91
|
+
})
|
|
92
|
+
if result == nil {
|
|
93
|
+
return nil, nil, errors.New("driver: Emit returned nil")
|
|
94
|
+
}
|
|
95
|
+
return result, convertDiagnostics(result.Diagnostics), nil
|
|
96
|
+
}
|
|
97
|
+
|
|
78
98
|
// EmitFile runs tsgo's emitter for one source file, applying the same rewrite
|
|
79
99
|
// pipeline as EmitAll.
|
|
80
100
|
func (p *Program) EmitFile(rs *RewriteSet, target *ast.SourceFile, writeFile shimcompiler.WriteFile) (*shimcompiler.EmitResult, []Diagnostic, error) {
|
|
@@ -90,12 +110,18 @@ func (p *Program) emit(rs *RewriteSet, target *ast.SourceFile, writeFile shimcom
|
|
|
90
110
|
}
|
|
91
111
|
cursors := map[string]int{}
|
|
92
112
|
wf := func(fileName, text string, data *shimcompiler.WriteFileData) error {
|
|
113
|
+
// A patched file is idempotent: once the sentinel exists, the emitted text
|
|
114
|
+
// is passed through unchanged. This matters for watch/rebuild loops and
|
|
115
|
+
// tests that re-run emit over the same output directory.
|
|
93
116
|
if strings.Contains(text, RewriteSentinel) {
|
|
94
117
|
if writeFile != nil {
|
|
95
118
|
return writeFile(fileName, text, data)
|
|
96
119
|
}
|
|
97
120
|
return DefaultWriteFile(fileName, text)
|
|
98
121
|
}
|
|
122
|
+
// Rewrites are matched after tsgo has printed JavaScript. The source-file
|
|
123
|
+
// association is recovered from the output path because WriteFile receives
|
|
124
|
+
// only the final file name and text.
|
|
99
125
|
patched, err := applyRewrites(fileName, text, rs, cursors)
|
|
100
126
|
if err != nil {
|
|
101
127
|
return err
|
|
@@ -120,7 +146,7 @@ func (p *Program) emit(rs *RewriteSet, target *ast.SourceFile, writeFile shimcom
|
|
|
120
146
|
}
|
|
121
147
|
|
|
122
148
|
// DefaultWriteFile is the default disk writer used when EmitAll's caller does not
|
|
123
|
-
// supply a custom WriteFile
|
|
149
|
+
// supply a custom WriteFile callback.
|
|
124
150
|
func DefaultWriteFile(fileName, text string) error {
|
|
125
151
|
if dir := filepath.Dir(fileName); dir != "" {
|
|
126
152
|
if err := os.MkdirAll(dir, 0o755); err != nil {
|
|
@@ -2,8 +2,10 @@ module github.com/samchon/ttsc/packages/ttsc
|
|
|
2
2
|
|
|
3
3
|
go 1.26
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
//
|
|
5
|
+
// Every shim sub-module is wired up via the sibling go.work file together
|
|
6
|
+
// with the local typescript-go checkout under ../../third_party/typescript-go.
|
|
7
|
+
// Tagged upstream versions can replace these local wires when the shim API
|
|
8
|
+
// stabilizes.
|
|
7
9
|
replace (
|
|
8
10
|
github.com/microsoft/typescript-go/shim/ast => ./shim/ast
|
|
9
11
|
github.com/microsoft/typescript-go/shim/bundled => ./shim/bundled
|
|
@@ -38,7 +40,7 @@ require (
|
|
|
38
40
|
require (
|
|
39
41
|
github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect
|
|
40
42
|
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
|
|
41
|
-
github.com/microsoft/typescript-go v0.0.0-
|
|
43
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 // indirect
|
|
42
44
|
github.com/zeebo/xxh3 v1.1.0 // indirect
|
|
43
45
|
golang.org/x/sync v0.20.0 // indirect
|
|
44
46
|
golang.org/x/sys v0.43.0 // indirect
|
|
@@ -4,8 +4,8 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
|
|
4
4
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
|
5
5
|
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
|
|
6
6
|
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
|
7
|
-
github.com/microsoft/typescript-go v0.0.0-
|
|
8
|
-
github.com/microsoft/typescript-go v0.0.0-
|
|
7
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157 h1:llOMPhKDiQ+UEJiAaQuuWaJOTg5V7tNNTEf9JPWoYSY=
|
|
8
|
+
github.com/microsoft/typescript-go v0.0.0-20260429010842-56ab4af42157/go.mod h1:m8YA0PMC7ti0GW0RI05D6fEcjQeu98XVS+FWF+VDW2k=
|
|
9
9
|
github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA=
|
|
10
10
|
github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0=
|
|
11
11
|
github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ=
|
|
@@ -55,6 +55,7 @@ type WithStatement = innerast.WithStatement
|
|
|
55
55
|
|
|
56
56
|
type ClassDeclaration = innerast.ClassDeclaration
|
|
57
57
|
type ClassExpression = innerast.ClassExpression
|
|
58
|
+
type ClassStaticBlockDeclaration = innerast.ClassStaticBlockDeclaration
|
|
58
59
|
type ConstructorDeclaration = innerast.ConstructorDeclaration
|
|
59
60
|
type EnumDeclaration = innerast.EnumDeclaration
|
|
60
61
|
type EnumMember = innerast.EnumMember
|
|
@@ -106,6 +107,7 @@ type TaggedTemplateExpression = innerast.TaggedTemplateExpression
|
|
|
106
107
|
type TemplateExpression = innerast.TemplateExpression
|
|
107
108
|
type TemplateSpan = innerast.TemplateSpan
|
|
108
109
|
type TypeAssertion = innerast.TypeAssertion
|
|
110
|
+
type TypeOperatorNode = innerast.TypeOperatorNode
|
|
109
111
|
type TypeOfExpression = innerast.TypeOfExpression
|
|
110
112
|
type VoidExpression = innerast.VoidExpression
|
|
111
113
|
type YieldExpression = innerast.YieldExpression
|
|
@@ -126,6 +128,7 @@ type ExternalModuleIndicatorOptions = innerast.ExternalModuleIndicatorOptions
|
|
|
126
128
|
|
|
127
129
|
const (
|
|
128
130
|
NodeFlagsNone = innerast.NodeFlagsNone
|
|
131
|
+
NodeFlagsSynthesized = innerast.NodeFlagsSynthesized
|
|
129
132
|
NodeFlagsLet = innerast.NodeFlagsLet
|
|
130
133
|
NodeFlagsConst = innerast.NodeFlagsConst
|
|
131
134
|
NodeFlagsBlockScoped = innerast.NodeFlagsBlockScoped
|
|
@@ -94,6 +94,7 @@ type ParenthesizedTypeNode = innerast.ParenthesizedTypeNode
|
|
|
94
94
|
const (
|
|
95
95
|
KindCallExpression = innerast.KindCallExpression
|
|
96
96
|
KindIdentifier = innerast.KindIdentifier
|
|
97
|
+
KindMultiLineCommentTrivia = innerast.KindMultiLineCommentTrivia
|
|
97
98
|
KindPropertyAccessExpression = innerast.KindPropertyAccessExpression
|
|
98
99
|
KindPropertySignature = innerast.KindPropertySignature
|
|
99
100
|
KindComputedPropertyName = innerast.KindComputedPropertyName
|
|
@@ -166,12 +167,12 @@ const (
|
|
|
166
167
|
ModifierFlagsReadonly = innerast.ModifierFlagsReadonly
|
|
167
168
|
)
|
|
168
169
|
|
|
169
|
-
func NewNodeFactory(
|
|
170
|
-
return innerast.NewNodeFactory(
|
|
170
|
+
func NewNodeFactory(options NodeFactoryHooks) *NodeFactory {
|
|
171
|
+
return innerast.NewNodeFactory(options)
|
|
171
172
|
}
|
|
172
173
|
|
|
173
|
-
func NewNodeVisitor(visit func(node *Node) *Node, factory *NodeFactory,
|
|
174
|
-
return innerast.NewNodeVisitor(visit, factory,
|
|
174
|
+
func NewNodeVisitor(visit func(node *Node) *Node, factory *NodeFactory, options NodeVisitorHooks) *NodeVisitor {
|
|
175
|
+
return innerast.NewNodeVisitor(visit, factory, options)
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
func IsFunctionLike(node *Node) bool {
|
|
@@ -24,3 +24,6 @@ const (
|
|
|
24
24
|
|
|
25
25
|
// NewTextRange constructs a closed/open [pos, end) text range.
|
|
26
26
|
func NewTextRange(pos, end int) TextRange { return innercore.NewTextRange(pos, end) }
|
|
27
|
+
|
|
28
|
+
// UndefinedTextRange marks synthesized AST nodes that do not map to source.
|
|
29
|
+
func UndefinedTextRange() TextRange { return innercore.UndefinedTextRange() }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typia",
|
|
3
|
-
"version": "13.0.0-dev.
|
|
3
|
+
"version": "13.0.0-dev.20260506",
|
|
4
4
|
"description": "Superfast runtime validators with only one line",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"inquirer": "^8.2.5",
|
|
43
43
|
"package-manager-detector": "^0.2.0",
|
|
44
44
|
"randexp": "^0.5.3",
|
|
45
|
-
"@typia/interface": "^13.0.0-dev.
|
|
46
|
-
"@typia/utils": "^13.0.0-dev.
|
|
45
|
+
"@typia/interface": "^13.0.0-dev.20260506",
|
|
46
|
+
"@typia/utils": "^13.0.0-dev.20260506"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/node": "^25.3.0",
|
|
53
53
|
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
54
54
|
"@typescript-eslint/parser": "^8.1.0",
|
|
55
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
55
|
+
"@typescript/native-preview": "7.0.0-dev.20260505.1",
|
|
56
56
|
"chalk": "^4.0.0",
|
|
57
57
|
"eslint-plugin-deprecation": "^3.0.0",
|
|
58
58
|
"rimraf": "^6.1.2",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"rollup-plugin-node-externals": "^8.1.2",
|
|
62
62
|
"suppress-warnings": "^1.0.2",
|
|
63
63
|
"tinyglobby": "^0.2.12",
|
|
64
|
-
"ttsc": "^0.
|
|
64
|
+
"ttsc": "^0.8.0"
|
|
65
65
|
},
|
|
66
66
|
"sideEffects": [
|
|
67
67
|
"./lib/_virtual/*.mjs",
|