diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6576cbd..af387c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,7 @@ jobs: - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + git submodule update --init --depth 1 extern/typescript-go git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 @@ -86,8 +85,7 @@ jobs: - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + git submodule update --init --depth 1 extern/typescript-go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: @@ -117,8 +115,7 @@ jobs: - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + git submodule update --init --depth 1 extern/typescript-go git submodule update --init --depth 1 extern/tstl - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 812cda3..3ab8835 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -103,8 +103,7 @@ jobs: - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + git submodule update --init --depth 1 extern/typescript-go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 543f3a0..c77692b 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -29,8 +29,7 @@ jobs: - name: Init submodules run: | - git submodule update --init --depth 1 extern/tsgolint - git -C extern/tsgolint submodule update --init --depth 1 typescript-go + git submodule update --init --depth 1 extern/typescript-go - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: diff --git a/.gitmodules b/.gitmodules index 4b832d4..9039256 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,8 +1,7 @@ -[submodule "extern/tsgolint"] - path = extern/tsgolint - url = https://github.com/oxc-project/tsgolint.git - ignore = dirty [submodule "extern/tstl"] path = extern/tstl url = https://github.com/TypeScriptToLua/TypeScriptToLua.git ignore = dirty +[submodule "extern/typescript-go"] + path = extern/typescript-go + url = https://github.com/microsoft/typescript-go diff --git a/NOTICE b/NOTICE index 42c2b9f..2862448 100644 --- a/NOTICE +++ b/NOTICE @@ -21,24 +21,23 @@ typescript-go https://github.com/microsoft/typescript-go Copyright (c) Microsoft Corporation -Licensed under the Apache License, Version 2.0 (extern/tsgolint/typescript-go/LICENSE) +Licensed under the Apache License, Version 2.0 (extern/typescript-go/LICENSE) tslua links against typescript-go's compiler and type checker internals for TypeScript parsing, type checking, and AST access. See -extern/tsgolint/typescript-go/NOTICE.txt for typescript-go's own third-party -notices. +extern/typescript-go/NOTICE.txt for typescript-go's own third-party notices. ================================================================================ -tsgolint +tsgolint (shim generator origin) https://github.com/oxc-project/tsgolint Copyright (c) 2025 July-present VoidZero Inc. & Contributors Copyright (c) 2025 July typescript-eslint and other contributors -Licensed under the MIT License (extern/tsgolint/LICENSE) +Licensed under the MIT License -tslua uses tsgolint's Go shim layer (extern/tsgolint/shim/) to access -typescript-go internal APIs via go:linkname. +tslua's shim generator (tools/gen_shims/) is derived from tsgolint's +tools/gen_shims. tsgolint is no longer a submodule dependency. ================================================================================ diff --git a/extern/tsgolint b/extern/tsgolint deleted file mode 160000 index 50cb30f..0000000 --- a/extern/tsgolint +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50cb30f8b286a67168692b1b6f4ee925b5b206af diff --git a/extern/typescript-go b/extern/typescript-go new file mode 160000 index 0000000..9c19dee --- /dev/null +++ b/extern/typescript-go @@ -0,0 +1 @@ +Subproject commit 9c19dee6ab88ae11444837f16efa16a6b3dc9f59 diff --git a/go.mod b/go.mod index 31b1f9a..5a0f364 100644 --- a/go.mod +++ b/go.mod @@ -3,30 +3,29 @@ module github.com/realcoldfry/tslua go 1.26 replace ( - github.com/microsoft/typescript-go => ./extern/tsgolint/typescript-go - github.com/microsoft/typescript-go/shim/ast => ./extern/tsgolint/shim/ast - github.com/microsoft/typescript-go/shim/bundled => ./extern/tsgolint/shim/bundled - github.com/microsoft/typescript-go/shim/checker => ./extern/tsgolint/shim/checker - github.com/microsoft/typescript-go/shim/checkershim => ./shim/checkershim + github.com/microsoft/typescript-go => ./extern/typescript-go + github.com/microsoft/typescript-go/shim/ast => ./shim/ast + github.com/microsoft/typescript-go/shim/bundled => ./shim/bundled + github.com/microsoft/typescript-go/shim/checker => ./shim/checker github.com/microsoft/typescript-go/shim/compiler => ./shim/compiler - github.com/microsoft/typescript-go/shim/core => ./extern/tsgolint/shim/core + github.com/microsoft/typescript-go/shim/core => ./shim/core github.com/microsoft/typescript-go/shim/diagnosticwriter => ./shim/diagnosticwriter github.com/microsoft/typescript-go/shim/incremental => ./shim/incremental - github.com/microsoft/typescript-go/shim/parser => ./extern/tsgolint/shim/parser - github.com/microsoft/typescript-go/shim/scanner => ./extern/tsgolint/shim/scanner - github.com/microsoft/typescript-go/shim/tsoptions => ./extern/tsgolint/shim/tsoptions - github.com/microsoft/typescript-go/shim/tspath => ./extern/tsgolint/shim/tspath - github.com/microsoft/typescript-go/shim/vfs => ./extern/tsgolint/shim/vfs - github.com/microsoft/typescript-go/shim/vfs/cachedvfs => ./extern/tsgolint/shim/vfs/cachedvfs - github.com/microsoft/typescript-go/shim/vfs/osvfs => ./extern/tsgolint/shim/vfs/osvfs + github.com/microsoft/typescript-go/shim/parser => ./shim/parser + github.com/microsoft/typescript-go/shim/scanner => ./shim/scanner + github.com/microsoft/typescript-go/shim/tsoptions => ./shim/tsoptions + github.com/microsoft/typescript-go/shim/tspath => ./shim/tspath + github.com/microsoft/typescript-go/shim/vfs => ./shim/vfs + github.com/microsoft/typescript-go/shim/vfs/cachedvfs => ./shim/vfs/cachedvfs + github.com/microsoft/typescript-go/shim/vfs/osvfs => ./shim/vfs/osvfs ) require ( github.com/fsnotify/fsnotify v1.9.0 + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 github.com/microsoft/typescript-go/shim/ast v0.0.0-00010101000000-000000000000 github.com/microsoft/typescript-go/shim/bundled v0.0.0 github.com/microsoft/typescript-go/shim/checker v0.0.0-00010101000000-000000000000 - github.com/microsoft/typescript-go/shim/checkershim v0.0.0 github.com/microsoft/typescript-go/shim/compiler v0.0.0 github.com/microsoft/typescript-go/shim/core v0.0.0 github.com/microsoft/typescript-go/shim/diagnosticwriter v0.0.0-00010101000000-000000000000 @@ -38,17 +37,18 @@ require ( github.com/microsoft/typescript-go/shim/vfs/cachedvfs v0.0.0 github.com/microsoft/typescript-go/shim/vfs/osvfs v0.0.0 github.com/spf13/cobra v1.10.2 + golang.org/x/text v0.35.0 + golang.org/x/tools v0.43.0 ) require ( github.com/dlclark/regexp2 v1.11.5 // indirect - github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/cpuid/v2 v2.2.10 // indirect github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d // indirect github.com/spf13/pflag v1.0.9 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect + golang.org/x/mod v0.34.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.42.0 // indirect - golang.org/x/text v0.35.0 // indirect ) diff --git a/go.sum b/go.sum index 97e9596..a721489 100644 --- a/go.sum +++ b/go.sum @@ -23,12 +23,16 @@ github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/internal/transpiler/assignment_validation.go b/internal/transpiler/assignment_validation.go index 4100d26..c02f914 100644 --- a/internal/transpiler/assignment_validation.go +++ b/internal/transpiler/assignment_validation.go @@ -6,7 +6,6 @@ import ( "github.com/microsoft/typescript-go/shim/ast" "github.com/microsoft/typescript-go/shim/checker" - "github.com/microsoft/typescript-go/shim/checkershim" dw "github.com/microsoft/typescript-go/shim/diagnosticwriter" ) @@ -46,9 +45,9 @@ func (t *Transpiler) getFunctionContextType(typ *checker.Type) contextType { // signatures (from union/intersection types) into their individual declarations. func (t *Transpiler) getSignatureContext(sig *checker.Signature) contextType { // Flatten composite signatures (union/intersection types) - if comp := checkershim.Signature_composite(sig); comp != nil { + if comp := checker.Signature_composite(sig); comp != nil { ct := contextNone - for _, cs := range checkershim.CompositeSignature_signatures(comp) { + for _, cs := range checker.CompositeSignature_signatures(comp) { ct |= t.getSignatureContext(cs) if ct == contextMixed { break diff --git a/justfile b/justfile index e82483e..6479114 100644 --- a/justfile +++ b/justfile @@ -161,9 +161,13 @@ bump-check: tstl-bump: cd extern/tstl && git fetch origin && git checkout origin/master -# Bump extern/tsgolint submodule to latest upstream master -tsgolint-bump: - cd extern/tsgolint && git fetch origin && git checkout origin/main && git submodule update --init +# Bump extern/typescript-go submodule to latest upstream main +tsgo-bump: + cd extern/typescript-go && git fetch origin && git checkout origin/main + +# Regenerate shim/ from extern/typescript-go (applies patches, runs gen_shims) +shim: + ./tools/update-shims.sh # Reset extern/tstl to the committed submodule pointer (discards patches/local changes) tstl-reset: diff --git a/patches/tsgo/0003-fix-early-return-from-invalid-tsconfig-for-better-er.patch b/patches/tsgo/0003-fix-early-return-from-invalid-tsconfig-for-better-er.patch new file mode 100644 index 0000000..c8ebc2d --- /dev/null +++ b/patches/tsgo/0003-fix-early-return-from-invalid-tsconfig-for-better-er.patch @@ -0,0 +1,31 @@ +From 2a26db3491c3f8696208e0245c04b2a9842ee3d1 Mon Sep 17 00:00:00 2001 +From: Cameron Clark +Date: Mon, 3 Nov 2025 12:44:32 +0000 +Subject: [PATCH 3/5] fix: early return from invalid tsconfig for better errors + +--- + internal/tsoptions/tsconfigparsing.go | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/internal/tsoptions/tsconfigparsing.go b/internal/tsoptions/tsconfigparsing.go +index 15118ae277..e12cb0e86d 100644 +--- a/internal/tsoptions/tsconfigparsing.go ++++ b/internal/tsoptions/tsconfigparsing.go +@@ -189,6 +189,17 @@ func parseOwnConfigOfJsonSourceFile( + var extendedConfigPath any + var rootCompilerOptions []*ast.PropertyName + var errors []*ast.Diagnostic ++ ++ // If there are parsing errors, return only the first one ++ if len(sourceFile.Diagnostics()) > 0 { ++ return &parsedTsconfig{ ++ raw: &collections.OrderedMap[string, any]{}, ++ options: compilerOptions, ++ typeAcquisition: typeAcquisition, ++ extendedConfigPath: extendedConfigPath, ++ }, []*ast.Diagnostic{sourceFile.Diagnostics()[0]} ++ } ++ + onPropertySet := func( + keyText string, + value any, diff --git a/patches/tsgo/0004-fix-collections-avoid-internal-json-import-in-ordere.patch b/patches/tsgo/0004-fix-collections-avoid-internal-json-import-in-ordere.patch new file mode 100644 index 0000000..1bb69d6 --- /dev/null +++ b/patches/tsgo/0004-fix-collections-avoid-internal-json-import-in-ordere.patch @@ -0,0 +1,71 @@ +From 3582c2868855f13b27ab1727f21da776462b10ff Mon Sep 17 00:00:00 2001 +From: Cameron Clark +Date: Fri, 13 Feb 2026 18:37:25 +0000 +Subject: [PATCH 4/5] fix(collections): avoid internal json import in + ordered_map + +--- + internal/collections/ordered_map.go | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/internal/collections/ordered_map.go b/internal/collections/ordered_map.go +index df66ec6401..02f0a56781 100644 +--- a/internal/collections/ordered_map.go ++++ b/internal/collections/ordered_map.go +@@ -9,7 +9,8 @@ import ( + "slices" + "strconv" + +- "github.com/microsoft/typescript-go/internal/json" ++ "github.com/go-json-experiment/json" ++ "github.com/go-json-experiment/json/jsontext" + ) + + // OrderedMap is an insertion ordered map. +@@ -214,8 +215,8 @@ func (m *OrderedMap[K, V]) clone() OrderedMap[K, V] { + + var _ json.MarshalerTo = (*OrderedMap[string, string])(nil) + +-func (m *OrderedMap[K, V]) MarshalJSONTo(enc *json.Encoder) error { +- if err := enc.WriteToken(json.BeginObject); err != nil { ++func (m *OrderedMap[K, V]) MarshalJSONTo(enc *jsontext.Encoder) error { ++ if err := enc.WriteToken(jsontext.BeginObject); err != nil { + return err + } + +@@ -235,7 +236,7 @@ func (m *OrderedMap[K, V]) MarshalJSONTo(enc *json.Encoder) error { + } + } + +- return enc.WriteToken(json.EndObject) ++ return enc.WriteToken(jsontext.EndObject) + } + + func resolveKeyName(k reflect.Value) (string, error) { +@@ -260,22 +261,22 @@ func resolveKeyName(k reflect.Value) (string, error) { + + var _ json.UnmarshalerFrom = (*OrderedMap[string, string])(nil) + +-func (m *OrderedMap[K, V]) UnmarshalJSONFrom(dec *json.Decoder) error { ++func (m *OrderedMap[K, V]) UnmarshalJSONFrom(dec *jsontext.Decoder) error { + token, err := dec.ReadToken() + if err != nil { + return err + } +- if token.Kind() == 'n' { // json.Null.Kind() ++ if token.Kind() == 'n' { // jsontext.Null.Kind() + // By convention, to approximate the behavior of Unmarshal itself, + // Unmarshalers implement UnmarshalJSON([]byte("null")) as a no-op. + // https://pkg.go.dev/encoding/json#Unmarshaler + // TODO: reconsider + return nil + } +- if token.Kind() != '{' { // json.ObjectStart.Kind() ++ if token.Kind() != '{' { // jsontext.ObjectStart.Kind() + return errors.New("cannot unmarshal non-object JSON value into Map") + } +- for dec.PeekKind() != '}' { // json.ObjectEnd.Kind() ++ for dec.PeekKind() != '}' { // jsontext.ObjectEnd.Kind() + var key K + var value V + if err := json.UnmarshalDecode(dec, &key); err != nil { diff --git a/patches/tsgo/0005-perf-vfs-cache-ReadFile-results-in-cachedvfs.patch b/patches/tsgo/0005-perf-vfs-cache-ReadFile-results-in-cachedvfs.patch new file mode 100644 index 0000000..075646c --- /dev/null +++ b/patches/tsgo/0005-perf-vfs-cache-ReadFile-results-in-cachedvfs.patch @@ -0,0 +1,62 @@ +From cc29366b23f06082dc93985ae20ef23120ad364b Mon Sep 17 00:00:00 2001 +From: Codex +Date: Thu, 12 Feb 2026 13:55:47 +0900 +Subject: [PATCH 5/5] perf(vfs): cache ReadFile results in cachedvfs + +--- + internal/vfs/cachedvfs/cachedvfs.go | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/internal/vfs/cachedvfs/cachedvfs.go b/internal/vfs/cachedvfs/cachedvfs.go +index 9c5a51df41..ce58bbf0c8 100644 +--- a/internal/vfs/cachedvfs/cachedvfs.go ++++ b/internal/vfs/cachedvfs/cachedvfs.go +@@ -15,10 +15,16 @@ type FS struct { + directoryExistsCache collections.SyncMap[string, bool] + fileExistsCache collections.SyncMap[string, bool] + getAccessibleEntriesCache collections.SyncMap[string, vfs.Entries] ++ readFileCache collections.SyncMap[string, readFileCacheEntry] + realpathCache collections.SyncMap[string, string] + statCache collections.SyncMap[string, vfs.FileInfo] + } + ++type readFileCacheEntry struct { ++ contents string ++ ok bool ++} ++ + var _ vfs.FS = (*FS)(nil) + + func From(fs vfs.FS) *FS { +@@ -41,6 +47,7 @@ func (fsys *FS) ClearCache() { + fsys.directoryExistsCache.Clear() + fsys.fileExistsCache.Clear() + fsys.getAccessibleEntriesCache.Clear() ++ fsys.readFileCache.Clear() + fsys.realpathCache.Clear() + fsys.statCache.Clear() + } +@@ -94,7 +101,22 @@ func (fsys *FS) GetAccessibleEntries(path string) vfs.Entries { + } + + func (fsys *FS) ReadFile(path string) (contents string, ok bool) { +- return fsys.fs.ReadFile(path) ++ if fsys.enabled.Load() { ++ if ret, hit := fsys.readFileCache.Load(path); hit { ++ return ret.contents, ret.ok ++ } ++ } ++ ++ contents, ok = fsys.fs.ReadFile(path) ++ ++ if fsys.enabled.Load() { ++ fsys.readFileCache.Store(path, readFileCacheEntry{ ++ contents: contents, ++ ok: ok, ++ }) ++ } ++ ++ return contents, ok + } + + func (fsys *FS) Realpath(path string) string { diff --git a/scripts/check-submodule-bumps.sh b/scripts/check-submodule-bumps.sh index 1cd965c..ebf9a37 100755 --- a/scripts/check-submodule-bumps.sh +++ b/scripts/check-submodule-bumps.sh @@ -10,81 +10,40 @@ yellow='\033[33m' cyan='\033[36m' reset='\033[0m' -check_tsgolint() { - local dir="$ROOT/extern/tsgolint" - local current=$(git -C "$ROOT" ls-tree HEAD extern/tsgolint | awk '{print $3}') - git -C "$dir" fetch --quiet origin +check_tsgo() { + local dir="$ROOT/extern/typescript-go" + local current=$(git -C "$ROOT" ls-tree HEAD extern/typescript-go | awk '{print $3}') + git -C "$dir" fetch --quiet origin 2>/dev/null || return - local latest=$(git -C "$dir" rev-parse origin/main 2>/dev/null || git -C "$dir" rev-parse origin/master) + local latest=$(git -C "$dir" rev-parse origin/main 2>/dev/null) local current_short=$(git -C "$dir" rev-parse --short "$current") local latest_short=$(git -C "$dir" rev-parse --short "$latest") local current_desc=$(git -C "$dir" describe --tags "$current" 2>/dev/null || echo "$current_short") - printf "${bold}tsgolint${reset} (oxc-project/tsgolint)\n" + printf "${bold}typescript-go${reset} (microsoft/typescript-go)\n" printf " pinned: %s\n" "$current_desc" if [ "$current" = "$latest" ]; then - printf " ${green}up to date${reset}\n" + printf " ${green}up to date with upstream main${reset}\n" else - local behind=$(git -C "$dir" rev-list --count "$current".."$latest") + local behind=$(git -C "$dir" rev-list --count "$current".."$latest" 2>/dev/null || echo "?") local latest_desc=$(git -C "$dir" describe --tags "$latest" 2>/dev/null || echo "$latest_short") printf " latest: %s\n" "$latest_desc" - printf " ${yellow}%d commit(s) behind${reset}\n" "$behind" - printf " new upstream commits:\n" - git -C "$dir" log --oneline --no-decorate "$current".."$latest" | sed 's/^/ /' - printf " ${cyan}run:${reset} git -C extern/tsgolint diff %s..%s\n" "$current_short" "$latest_short" - fi - - # Check inner typescript-go submodule - check_tsgo "$dir" "$current" "$latest" -} - -check_tsgo() { - local tsgolint_dir="$1" - local tsgolint_pinned="$2" - local tsgolint_latest="$3" - local tsgo_dir="$tsgolint_dir/typescript-go" - - # Get the typescript-go commit pinned by our tsgolint commit - local tsgo_current=$(git -C "$tsgolint_dir" ls-tree "$tsgolint_pinned" typescript-go | awk '{print $3}') - if [ -z "$tsgo_current" ]; then - return + printf " ${yellow}%s commit(s) behind upstream main${reset}\n" "$behind" + git -C "$dir" log --oneline --no-decorate "$current".."$latest" | head -20 | sed 's/^/ /' + printf " ${cyan}run:${reset} git -C extern/typescript-go log --oneline %s..%s\n" "$current_short" "$latest_short" fi - git -C "$tsgo_dir" fetch --quiet origin 2>/dev/null || return - - local tsgo_current_short=$(git -C "$tsgo_dir" rev-parse --short "$tsgo_current") - - # Get typescript-go commit that latest tsgolint points to - local tsgo_in_latest=$(git -C "$tsgolint_dir" ls-tree "$tsgolint_latest" typescript-go 2>/dev/null | awk '{print $3}') - # Also check latest upstream typescript-go main - local tsgo_upstream=$(git -C "$tsgo_dir" rev-parse origin/main 2>/dev/null) - - printf "\n${bold} typescript-go${reset} (microsoft/typescript-go)\n" - local tsgo_current_desc=$(git -C "$tsgo_dir" describe --tags "$tsgo_current" 2>/dev/null || echo "$tsgo_current_short") - printf " pinned: %s\n" "$tsgo_current_desc" - - # Behind tsgolint latest - if [ -n "$tsgo_in_latest" ] && [ "$tsgo_current" != "$tsgo_in_latest" ]; then - local behind_tsgolint=$(git -C "$tsgo_dir" rev-list --count "$tsgo_current".."$tsgo_in_latest" 2>/dev/null || echo "?") - local tsgo_in_latest_desc=$(git -C "$tsgo_dir" describe --tags "$tsgo_in_latest" 2>/dev/null || git -C "$tsgo_dir" rev-parse --short "$tsgo_in_latest") - local tsgo_in_latest_short=$(git -C "$tsgo_dir" rev-parse --short "$tsgo_in_latest") - printf " in latest tsgolint: %s\n" "$tsgo_in_latest_desc" - printf " ${yellow}%s commit(s) behind latest tsgolint${reset}\n" "$behind_tsgolint" - git -C "$tsgo_dir" log --oneline --no-decorate "$tsgo_current".."$tsgo_in_latest" 2>/dev/null | sed 's/^/ /' - printf " ${cyan}run:${reset} git -C extern/tsgolint/typescript-go diff %s..%s\n" "$tsgo_current_short" "$tsgo_in_latest_short" - elif [ -n "$tsgo_in_latest" ]; then - printf " ${green}up to date with latest tsgolint${reset}\n" - fi - - # Behind upstream main - if [ -n "$tsgo_upstream" ] && [ "$tsgo_current" != "$tsgo_upstream" ]; then - local behind_upstream=$(git -C "$tsgo_dir" rev-list --count "$tsgo_current".."$tsgo_upstream" 2>/dev/null || echo "?") - local tsgo_upstream_short=$(git -C "$tsgo_dir" rev-parse --short "$tsgo_upstream") - printf " ${yellow}%s commit(s) behind upstream main${reset}\n" "$behind_upstream" - printf " ${cyan}run:${reset} git -C extern/tsgolint/typescript-go log --oneline %s..%s\n" "$tsgo_current_short" "$tsgo_upstream_short" - elif [ -n "$tsgo_upstream" ]; then - printf " ${green}up to date with upstream main${reset}\n" + # Show active patches + local patches_dir="$ROOT/patches/tsgo" + if [ -d "$patches_dir" ]; then + local patch_files=("$patches_dir"/*.patch) + if [ ${#patch_files[@]} -gt 0 ] && [ -e "${patch_files[0]}" ]; then + printf " patches: %d\n" "${#patch_files[@]}" + for f in "${patch_files[@]}"; do + printf " %s\n" "$(basename "$f")" + done + fi fi } @@ -129,7 +88,7 @@ check_tstl() { } echo "" -check_tsgolint +check_tsgo echo "" check_tstl echo "" diff --git a/scripts/setup.sh b/scripts/setup.sh index ce5e572..817869b 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -37,8 +37,7 @@ fi echo "" echo "Initializing submodules..." -git submodule update --init extern/tsgolint -git -C extern/tsgolint submodule update --init typescript-go +git submodule update --init extern/typescript-go git submodule update --init extern/tstl echo "" diff --git a/shim/ast/extra-shim.json b/shim/ast/extra-shim.json new file mode 100644 index 0000000..6440103 --- /dev/null +++ b/shim/ast/extra-shim.json @@ -0,0 +1,16 @@ +{ + "ExtraMethods": { + "Node": [ + "Type" + ], + "Diagnostic": [ + "File", + "Loc", + "Code", + "Category", + "MessageKey", + "MessageArgs", + "Localize" + ] + } +} diff --git a/shim/ast/go.mod b/shim/ast/go.mod new file mode 100644 index 0000000..6449b11 --- /dev/null +++ b/shim/ast/go.mod @@ -0,0 +1,14 @@ +module github.com/microsoft/typescript-go/shim/ast + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect +) diff --git a/shim/ast/go.sum b/shim/ast/go.sum new file mode 100644 index 0000000..327121e --- /dev/null +++ b/shim/ast/go.sum @@ -0,0 +1,20 @@ +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/ast/helpers.go b/shim/ast/helpers.go new file mode 100644 index 0000000..1f1b638 --- /dev/null +++ b/shim/ast/helpers.go @@ -0,0 +1,25 @@ +// This file contains manual helpers for the ast shim package. +// It is NOT generated and should be preserved when regenerating shims. +// +// To regenerate shims: just shim + +package ast + +import ( + "github.com/microsoft/typescript-go/internal/diagnostics" + "github.com/microsoft/typescript-go/internal/locale" + _ "unsafe" +) + +//go:linkname defaultLocale github.com/microsoft/typescript-go/internal/locale.Default +var defaultLocale locale.Locale + +// DefaultLocale returns the default locale (English) for diagnostic localization. +// This is exported so that other packages can use it with Diagnostic_Localize. +func DefaultLocale() locale.Locale { + return defaultLocale +} + +// DiagnosticsMessage is an alias for the internal diagnostics.Message type +// This allows other packages to reference the type without importing internal packages +type DiagnosticsMessage = diagnostics.Message diff --git a/shim/ast/shim.go b/shim/ast/shim.go new file mode 100644 index 0000000..dbab8e4 --- /dev/null +++ b/shim/ast/shim.go @@ -0,0 +1,2415 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package ast + +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/diagnostics" +import "github.com/microsoft/typescript-go/internal/locale" +import "github.com/microsoft/typescript-go/internal/tspath" +import _ "unsafe" + +type AccessExpression = ast.AccessExpression +type AccessKind = ast.AccessKind +const AccessKindRead = ast.AccessKindRead +const AccessKindReadWrite = ast.AccessKindReadWrite +const AccessKindWrite = ast.AccessKindWrite +type AccessorDeclaration = ast.AccessorDeclaration +type AccessorDeclarationBase = ast.AccessorDeclarationBase +type AllAccessorDeclarations = ast.AllAccessorDeclarations +type AnyImportOrRequireStatement = ast.AnyImportOrRequireStatement +type AnyImportSyntax = ast.AnyImportSyntax +type AnyValidImportOrReExport = ast.AnyValidImportOrReExport +type ArgumentList = ast.ArgumentList +type ArrayLiteralExpression = ast.ArrayLiteralExpression +type ArrayTypeNode = ast.ArrayTypeNode +type ArrowFunction = ast.ArrowFunction +type AsExpression = ast.AsExpression +type AwaitExpression = ast.AwaitExpression +type BigIntLiteral = ast.BigIntLiteral +type BinaryExpression = ast.BinaryExpression +type BindingElement = ast.BindingElement +type BindingElementList = ast.BindingElementList +type BindingElementNode = ast.BindingElementNode +type BindingName = ast.BindingName +type BindingPattern = ast.BindingPattern +type BindingPatternNode = ast.BindingPatternNode +type Block = ast.Block +type BlockNode = ast.BlockNode +type BlockOrExpression = ast.BlockOrExpression +type BodyBase = ast.BodyBase +type BreakOrContinueStatement = ast.BreakOrContinueStatement +type BreakStatement = ast.BreakStatement +type CallExpression = ast.CallExpression +type CallLikeExpression = ast.CallLikeExpression +type CallOrNewExpression = ast.CallOrNewExpression +type CallSignatureDeclaration = ast.CallSignatureDeclaration +//go:linkname CanHaveDecorators github.com/microsoft/typescript-go/internal/ast.CanHaveDecorators +func CanHaveDecorators(node *ast.Node) bool +//go:linkname CanHaveIllegalDecorators github.com/microsoft/typescript-go/internal/ast.CanHaveIllegalDecorators +func CanHaveIllegalDecorators(node *ast.Node) bool +//go:linkname CanHaveIllegalModifiers github.com/microsoft/typescript-go/internal/ast.CanHaveIllegalModifiers +func CanHaveIllegalModifiers(node *ast.Node) bool +//go:linkname CanHaveModifiers github.com/microsoft/typescript-go/internal/ast.CanHaveModifiers +func CanHaveModifiers(node *ast.Node) bool +//go:linkname CanHaveSymbol github.com/microsoft/typescript-go/internal/ast.CanHaveSymbol +func CanHaveSymbol(node *ast.Node) bool +type CaseBlock = ast.CaseBlock +type CaseBlockNode = ast.CaseBlockNode +type CaseClauseNode = ast.CaseClauseNode +type CaseClausesList = ast.CaseClausesList +type CaseOrDefaultClause = ast.CaseOrDefaultClause +type CaseOrDefaultClauseNode = ast.CaseOrDefaultClauseNode +type CatchClause = ast.CatchClause +type CatchClauseNode = ast.CatchClauseNode +type CheckFlags = ast.CheckFlags +const CheckFlagsContainsPrivate = ast.CheckFlagsContainsPrivate +const CheckFlagsContainsProtected = ast.CheckFlagsContainsProtected +const CheckFlagsContainsPublic = ast.CheckFlagsContainsPublic +const CheckFlagsContainsStatic = ast.CheckFlagsContainsStatic +const CheckFlagsDeferredType = ast.CheckFlagsDeferredType +const CheckFlagsHasLiteralType = ast.CheckFlagsHasLiteralType +const CheckFlagsHasNeverType = ast.CheckFlagsHasNeverType +const CheckFlagsHasNonUniformType = ast.CheckFlagsHasNonUniformType +const CheckFlagsIndexSymbol = ast.CheckFlagsIndexSymbol +const CheckFlagsInstantiated = ast.CheckFlagsInstantiated +const CheckFlagsIsDiscriminant = ast.CheckFlagsIsDiscriminant +const CheckFlagsIsDiscriminantComputed = ast.CheckFlagsIsDiscriminantComputed +const CheckFlagsLate = ast.CheckFlagsLate +const CheckFlagsMapped = ast.CheckFlagsMapped +const CheckFlagsNonUniformAndLiteral = ast.CheckFlagsNonUniformAndLiteral +const CheckFlagsNone = ast.CheckFlagsNone +const CheckFlagsOptionalParameter = ast.CheckFlagsOptionalParameter +const CheckFlagsPartial = ast.CheckFlagsPartial +const CheckFlagsReadPartial = ast.CheckFlagsReadPartial +const CheckFlagsReadonly = ast.CheckFlagsReadonly +const CheckFlagsRestParameter = ast.CheckFlagsRestParameter +const CheckFlagsReverseMapped = ast.CheckFlagsReverseMapped +const CheckFlagsStripOptional = ast.CheckFlagsStripOptional +const CheckFlagsSynthetic = ast.CheckFlagsSynthetic +const CheckFlagsSyntheticMethod = ast.CheckFlagsSyntheticMethod +const CheckFlagsSyntheticProperty = ast.CheckFlagsSyntheticProperty +const CheckFlagsUnresolved = ast.CheckFlagsUnresolved +const CheckFlagsWritePartial = ast.CheckFlagsWritePartial +type CheckJsDirective = ast.CheckJsDirective +//go:linkname ChildIsDecorated github.com/microsoft/typescript-go/internal/ast.ChildIsDecorated +func ChildIsDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.Node) bool +type ClassDeclaration = ast.ClassDeclaration +type ClassElement = ast.ClassElement +type ClassElementBase = ast.ClassElementBase +type ClassElementList = ast.ClassElementList +//go:linkname ClassElementOrClassElementParameterIsDecorated github.com/microsoft/typescript-go/internal/ast.ClassElementOrClassElementParameterIsDecorated +func ClassElementOrClassElementParameterIsDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.Node) bool +type ClassExpression = ast.ClassExpression +type ClassLikeBase = ast.ClassLikeBase +type ClassLikeDeclaration = ast.ClassLikeDeclaration +//go:linkname ClassOrConstructorParameterIsDecorated github.com/microsoft/typescript-go/internal/ast.ClassOrConstructorParameterIsDecorated +func ClassOrConstructorParameterIsDecorated(useLegacyDecorators bool, node *ast.Node) bool +type ClassStaticBlockDeclaration = ast.ClassStaticBlockDeclaration +//go:linkname ClimbPastPropertyAccess github.com/microsoft/typescript-go/internal/ast.ClimbPastPropertyAccess +func ClimbPastPropertyAccess(node *ast.Node) *ast.Node +type CommentDirective = ast.CommentDirective +type CommentDirectiveKind = ast.CommentDirectiveKind +const CommentDirectiveKindExpectError = ast.CommentDirectiveKindExpectError +const CommentDirectiveKindIgnore = ast.CommentDirectiveKindIgnore +const CommentDirectiveKindUnknown = ast.CommentDirectiveKindUnknown +type CommentRange = ast.CommentRange +type CommonJSExport = ast.CommonJSExport +//go:linkname CompareDiagnostics github.com/microsoft/typescript-go/internal/ast.CompareDiagnostics +func CompareDiagnostics(d1 *ast.Diagnostic, d2 *ast.Diagnostic) int +//go:linkname CompareNodePositions github.com/microsoft/typescript-go/internal/ast.CompareNodePositions +func CompareNodePositions(n1 *ast.Node, n2 *ast.Node) int +//go:linkname ComputePositionMap github.com/microsoft/typescript-go/internal/ast.ComputePositionMap +func ComputePositionMap(text string) *ast.PositionMap +type ComputedPropertyName = ast.ComputedPropertyName +type ConditionalExpression = ast.ConditionalExpression +type ConditionalTypeNode = ast.ConditionalTypeNode +type ConstructSignatureDeclaration = ast.ConstructSignatureDeclaration +type ConstructorDeclaration = ast.ConstructorDeclaration +type ConstructorDeclarationNode = ast.ConstructorDeclarationNode +type ConstructorTypeNode = ast.ConstructorTypeNode +//go:linkname ContainsObjectRestOrSpread github.com/microsoft/typescript-go/internal/ast.ContainsObjectRestOrSpread +func ContainsObjectRestOrSpread(node *ast.Node) bool +type ContinueStatement = ast.ContinueStatement +//go:linkname CreateModifiersFromModifierFlags github.com/microsoft/typescript-go/internal/ast.CreateModifiersFromModifierFlags +func CreateModifiersFromModifierFlags(flags ast.ModifierFlags, createModifier func(kind ast.Kind) *ast.Node) []*ast.Node +type DebuggerStatement = ast.DebuggerStatement +type Declaration = ast.Declaration +type DeclarationBase = ast.DeclarationBase +type DeclarationName = ast.DeclarationName +type Decorator = ast.Decorator +type DeleteExpression = ast.DeleteExpression +type Diagnostic = ast.Diagnostic +//go:linkname Diagnostic_File github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).File +func Diagnostic_File(recv *ast.Diagnostic) *ast.SourceFile +//go:linkname Diagnostic_Loc github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).Loc +func Diagnostic_Loc(recv *ast.Diagnostic) core.TextRange +//go:linkname Diagnostic_Code github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).Code +func Diagnostic_Code(recv *ast.Diagnostic) int32 +//go:linkname Diagnostic_Category github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).Category +func Diagnostic_Category(recv *ast.Diagnostic) diagnostics.Category +//go:linkname Diagnostic_MessageKey github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).MessageKey +func Diagnostic_MessageKey(recv *ast.Diagnostic) diagnostics.Key +//go:linkname Diagnostic_MessageArgs github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).MessageArgs +func Diagnostic_MessageArgs(recv *ast.Diagnostic) []string +//go:linkname Diagnostic_Localize github.com/microsoft/typescript-go/internal/ast.(*Diagnostic).Localize +func Diagnostic_Localize(recv *ast.Diagnostic, locale locale.Locale) string +type DiagnosticsCollection = ast.DiagnosticsCollection +type DoStatement = ast.DoStatement +type ElementAccessExpression = ast.ElementAccessExpression +type ElementList = ast.ElementList +type EmptyStatement = ast.EmptyStatement +type EntityName = ast.EntityName +//go:linkname EntityNameToString github.com/microsoft/typescript-go/internal/ast.EntityNameToString +func EntityNameToString(name *ast.Node, getTextOfNode func(*ast.Node) string) string +type EnumDeclaration = ast.EnumDeclaration +type EnumDeclarationNode = ast.EnumDeclarationNode +type EnumMember = ast.EnumMember +type EnumMemberList = ast.EnumMemberList +type EnumMemberNode = ast.EnumMemberNode +//go:linkname EqualDiagnostics github.com/microsoft/typescript-go/internal/ast.EqualDiagnostics +func EqualDiagnostics(d1 *ast.Diagnostic, d2 *ast.Diagnostic) bool +//go:linkname EqualDiagnosticsNoRelatedInfo github.com/microsoft/typescript-go/internal/ast.EqualDiagnosticsNoRelatedInfo +func EqualDiagnosticsNoRelatedInfo(d1 *ast.Diagnostic, d2 *ast.Diagnostic) bool +type ExportAssignment = ast.ExportAssignment +//go:linkname ExportAssignmentIsAlias github.com/microsoft/typescript-go/internal/ast.ExportAssignmentIsAlias +func ExportAssignmentIsAlias(node *ast.Node) bool +type ExportDeclaration = ast.ExportDeclaration +type ExportSpecifier = ast.ExportSpecifier +type ExportSpecifierList = ast.ExportSpecifierList +type ExportSpecifierNode = ast.ExportSpecifierNode +type ExportableBase = ast.ExportableBase +type Expression = ast.Expression +type ExpressionBase = ast.ExpressionBase +type ExpressionStatement = ast.ExpressionStatement +type ExpressionWithTypeArguments = ast.ExpressionWithTypeArguments +type ExpressionWithTypeArgumentsList = ast.ExpressionWithTypeArgumentsList +type ExpressionWithTypeArgumentsNode = ast.ExpressionWithTypeArgumentsNode +type ExternalModuleIndicatorOptions = ast.ExternalModuleIndicatorOptions +type ExternalModuleReference = ast.ExternalModuleReference +type FileReference = ast.FileReference +//go:linkname FindAncestor github.com/microsoft/typescript-go/internal/ast.FindAncestor +func FindAncestor(node *ast.Node, callback func(*ast.Node) bool) *ast.Node +const FindAncestorFalse = ast.FindAncestorFalse +//go:linkname FindAncestorKind github.com/microsoft/typescript-go/internal/ast.FindAncestorKind +func FindAncestorKind(node *ast.Node, kind ast.Kind) *ast.Node +//go:linkname FindAncestorOrQuit github.com/microsoft/typescript-go/internal/ast.FindAncestorOrQuit +func FindAncestorOrQuit(node *ast.Node, callback func(*ast.Node) ast.FindAncestorResult) *ast.Node +const FindAncestorQuit = ast.FindAncestorQuit +type FindAncestorResult = ast.FindAncestorResult +const FindAncestorTrue = ast.FindAncestorTrue +//go:linkname FindConstructorDeclaration github.com/microsoft/typescript-go/internal/ast.FindConstructorDeclaration +func FindConstructorDeclaration(node *ast.ClassLikeDeclaration) *ast.Node +//go:linkname FindLastVisibleNode github.com/microsoft/typescript-go/internal/ast.FindLastVisibleNode +func FindLastVisibleNode(nodes []*ast.Node) *ast.Node +type FlowFlags = ast.FlowFlags +const FlowFlagsArrayMutation = ast.FlowFlagsArrayMutation +const FlowFlagsAssignment = ast.FlowFlagsAssignment +const FlowFlagsBranchLabel = ast.FlowFlagsBranchLabel +const FlowFlagsCall = ast.FlowFlagsCall +const FlowFlagsCondition = ast.FlowFlagsCondition +const FlowFlagsFalseCondition = ast.FlowFlagsFalseCondition +const FlowFlagsLabel = ast.FlowFlagsLabel +const FlowFlagsLoopLabel = ast.FlowFlagsLoopLabel +const FlowFlagsReduceLabel = ast.FlowFlagsReduceLabel +const FlowFlagsReferenced = ast.FlowFlagsReferenced +const FlowFlagsShared = ast.FlowFlagsShared +const FlowFlagsStart = ast.FlowFlagsStart +const FlowFlagsSwitchClause = ast.FlowFlagsSwitchClause +const FlowFlagsTrueCondition = ast.FlowFlagsTrueCondition +const FlowFlagsUnreachable = ast.FlowFlagsUnreachable +type FlowLabel = ast.FlowLabel +type FlowList = ast.FlowList +type FlowNode = ast.FlowNode +type FlowNodeBase = ast.FlowNodeBase +type FlowReduceLabelData = ast.FlowReduceLabelData +type FlowSwitchClauseData = ast.FlowSwitchClauseData +//go:linkname ForEachChildAndJSDoc github.com/microsoft/typescript-go/internal/ast.ForEachChildAndJSDoc +func ForEachChildAndJSDoc(node *ast.Node, sourceFile *ast.SourceFile, v ast.Visitor) bool +//go:linkname ForEachDynamicImportOrRequireCall github.com/microsoft/typescript-go/internal/ast.ForEachDynamicImportOrRequireCall +func ForEachDynamicImportOrRequireCall(file *ast.SourceFile, includeTypeSpaceImports bool, requireStringLiteralLikeArgument bool, cb func(node *ast.Node, argument *ast.Expression) bool) bool +//go:linkname ForEachReturnStatement github.com/microsoft/typescript-go/internal/ast.ForEachReturnStatement +func ForEachReturnStatement(body *ast.Node, visitor func(stmt *ast.Node) bool) bool +type ForInOrOfStatement = ast.ForInOrOfStatement +type ForInitializer = ast.ForInitializer +type ForStatement = ast.ForStatement +type FunctionDeclaration = ast.FunctionDeclaration +type FunctionDeclarationNode = ast.FunctionDeclarationNode +type FunctionExpression = ast.FunctionExpression +type FunctionFlags = ast.FunctionFlags +const FunctionFlagsAsync = ast.FunctionFlagsAsync +const FunctionFlagsAsyncGenerator = ast.FunctionFlagsAsyncGenerator +const FunctionFlagsGenerator = ast.FunctionFlagsGenerator +const FunctionFlagsInvalid = ast.FunctionFlagsInvalid +const FunctionFlagsNormal = ast.FunctionFlagsNormal +type FunctionLikeBase = ast.FunctionLikeBase +type FunctionLikeDeclaration = ast.FunctionLikeDeclaration +type FunctionLikeWithBodyBase = ast.FunctionLikeWithBodyBase +type FunctionOrConstructorTypeNodeBase = ast.FunctionOrConstructorTypeNodeBase +type FunctionTypeNode = ast.FunctionTypeNode +type GetAccessorDeclaration = ast.GetAccessorDeclaration +//go:linkname GetAllAccessorDeclarations github.com/microsoft/typescript-go/internal/ast.GetAllAccessorDeclarations +func GetAllAccessorDeclarations(parentDeclarations []*ast.Node, accessor *ast.AccessorDeclaration) ast.AllAccessorDeclarations +//go:linkname GetAllAccessorDeclarationsForDeclaration github.com/microsoft/typescript-go/internal/ast.GetAllAccessorDeclarationsForDeclaration +func GetAllAccessorDeclarationsForDeclaration(accessor *ast.AccessorDeclaration, declarationsOfSymbol []*ast.Node) ast.AllAccessorDeclarations +//go:linkname GetAssignedName github.com/microsoft/typescript-go/internal/ast.GetAssignedName +func GetAssignedName(node *ast.Node) *ast.Node +//go:linkname GetAssignmentDeclarationKind github.com/microsoft/typescript-go/internal/ast.GetAssignmentDeclarationKind +func GetAssignmentDeclarationKind(node *ast.Node) ast.JSDeclarationKind +//go:linkname GetAssignmentTarget github.com/microsoft/typescript-go/internal/ast.GetAssignmentTarget +func GetAssignmentTarget(node *ast.Node) *ast.Node +//go:linkname GetBinaryOperatorPrecedence github.com/microsoft/typescript-go/internal/ast.GetBinaryOperatorPrecedence +func GetBinaryOperatorPrecedence(operatorKind ast.Kind) ast.OperatorPrecedence +//go:linkname GetClassExtendsHeritageElement github.com/microsoft/typescript-go/internal/ast.GetClassExtendsHeritageElement +func GetClassExtendsHeritageElement(node *ast.Node) *ast.ExpressionWithTypeArgumentsNode +//go:linkname GetClassLikeDeclarationOfSymbol github.com/microsoft/typescript-go/internal/ast.GetClassLikeDeclarationOfSymbol +func GetClassLikeDeclarationOfSymbol(symbol *ast.Symbol) *ast.Node +//go:linkname GetCombinedModifierFlags github.com/microsoft/typescript-go/internal/ast.GetCombinedModifierFlags +func GetCombinedModifierFlags(node *ast.Node) ast.ModifierFlags +//go:linkname GetCombinedNodeFlags github.com/microsoft/typescript-go/internal/ast.GetCombinedNodeFlags +func GetCombinedNodeFlags(node *ast.Node) ast.NodeFlags +//go:linkname GetContainingClass github.com/microsoft/typescript-go/internal/ast.GetContainingClass +func GetContainingClass(node *ast.Node) *ast.Node +//go:linkname GetContainingFunction github.com/microsoft/typescript-go/internal/ast.GetContainingFunction +func GetContainingFunction(node *ast.Node) *ast.Node +//go:linkname GetDeclarationContainer github.com/microsoft/typescript-go/internal/ast.GetDeclarationContainer +func GetDeclarationContainer(node *ast.Node) *ast.Node +//go:linkname GetDeclarationFromName github.com/microsoft/typescript-go/internal/ast.GetDeclarationFromName +func GetDeclarationFromName(name *ast.Node) *ast.Declaration +//go:linkname GetDeclarationName github.com/microsoft/typescript-go/internal/ast.GetDeclarationName +func GetDeclarationName(declaration *ast.Node) string +//go:linkname GetDeclarationOfKind github.com/microsoft/typescript-go/internal/ast.GetDeclarationOfKind +func GetDeclarationOfKind(symbol *ast.Symbol, kind ast.Kind) *ast.Node +//go:linkname GetElementOrPropertyAccessName github.com/microsoft/typescript-go/internal/ast.GetElementOrPropertyAccessName +func GetElementOrPropertyAccessName(node *ast.Node) *ast.Node +//go:linkname GetElementsOfBindingOrAssignmentPattern github.com/microsoft/typescript-go/internal/ast.GetElementsOfBindingOrAssignmentPattern +func GetElementsOfBindingOrAssignmentPattern(name *ast.Node) []*ast.Node +//go:linkname GetEmitModuleFormatOfFileWorker github.com/microsoft/typescript-go/internal/ast.GetEmitModuleFormatOfFileWorker +func GetEmitModuleFormatOfFileWorker(fileName string, options *core.CompilerOptions, sourceFileMetaData ast.SourceFileMetaData) core.ModuleKind +//go:linkname GetEnclosingBlockScopeContainer github.com/microsoft/typescript-go/internal/ast.GetEnclosingBlockScopeContainer +func GetEnclosingBlockScopeContainer(node *ast.Node) *ast.Node +//go:linkname GetExports github.com/microsoft/typescript-go/internal/ast.GetExports +func GetExports(symbol *ast.Symbol) ast.SymbolTable +//go:linkname GetExpressionPrecedence github.com/microsoft/typescript-go/internal/ast.GetExpressionPrecedence +func GetExpressionPrecedence(expression *ast.Expression) ast.OperatorPrecedence +//go:linkname GetExtendsHeritageClauseElement github.com/microsoft/typescript-go/internal/ast.GetExtendsHeritageClauseElement +func GetExtendsHeritageClauseElement(node *ast.Node) *ast.ExpressionWithTypeArgumentsNode +//go:linkname GetExtendsHeritageClauseElements github.com/microsoft/typescript-go/internal/ast.GetExtendsHeritageClauseElements +func GetExtendsHeritageClauseElements(node *ast.Node) []*ast.ExpressionWithTypeArgumentsNode +//go:linkname GetExternalModuleImportEqualsDeclarationExpression github.com/microsoft/typescript-go/internal/ast.GetExternalModuleImportEqualsDeclarationExpression +func GetExternalModuleImportEqualsDeclarationExpression(node *ast.Node) *ast.Node +//go:linkname GetExternalModuleIndicatorOptions github.com/microsoft/typescript-go/internal/ast.GetExternalModuleIndicatorOptions +func GetExternalModuleIndicatorOptions(fileName string, options *core.CompilerOptions, metadata ast.SourceFileMetaData) ast.ExternalModuleIndicatorOptions +//go:linkname GetExternalModuleName github.com/microsoft/typescript-go/internal/ast.GetExternalModuleName +func GetExternalModuleName(node *ast.Node) *ast.Expression +//go:linkname GetFirstConstructorWithBody github.com/microsoft/typescript-go/internal/ast.GetFirstConstructorWithBody +func GetFirstConstructorWithBody(node *ast.Node) *ast.Node +//go:linkname GetFirstIdentifier github.com/microsoft/typescript-go/internal/ast.GetFirstIdentifier +func GetFirstIdentifier(node *ast.Node) *ast.Node +//go:linkname GetFunctionFlags github.com/microsoft/typescript-go/internal/ast.GetFunctionFlags +func GetFunctionFlags(node *ast.Node) ast.FunctionFlags +//go:linkname GetHeritageClause github.com/microsoft/typescript-go/internal/ast.GetHeritageClause +func GetHeritageClause(node *ast.Node, kind ast.Kind) *ast.Node +//go:linkname GetHeritageElements github.com/microsoft/typescript-go/internal/ast.GetHeritageElements +func GetHeritageElements(node *ast.Node, kind ast.Kind) []*ast.Node +//go:linkname GetImmediatelyInvokedFunctionExpression github.com/microsoft/typescript-go/internal/ast.GetImmediatelyInvokedFunctionExpression +func GetImmediatelyInvokedFunctionExpression(fn *ast.Node) *ast.Node +//go:linkname GetImplementsHeritageClauseElements github.com/microsoft/typescript-go/internal/ast.GetImplementsHeritageClauseElements +func GetImplementsHeritageClauseElements(node *ast.Node) []*ast.ExpressionWithTypeArgumentsNode +//go:linkname GetImplementsTypeNodes github.com/microsoft/typescript-go/internal/ast.GetImplementsTypeNodes +func GetImplementsTypeNodes(node *ast.Node) []*ast.ExpressionWithTypeArgumentsNode +//go:linkname GetImpliedNodeFormatForEmitWorker github.com/microsoft/typescript-go/internal/ast.GetImpliedNodeFormatForEmitWorker +func GetImpliedNodeFormatForEmitWorker(fileName string, emitModuleKind core.ModuleKind, sourceFileMetaData ast.SourceFileMetaData) core.ResolutionMode +//go:linkname GetImpliedNodeFormatForFile github.com/microsoft/typescript-go/internal/ast.GetImpliedNodeFormatForFile +func GetImpliedNodeFormatForFile(path string, packageJsonType string) core.ModuleKind +//go:linkname GetImportAttributes github.com/microsoft/typescript-go/internal/ast.GetImportAttributes +func GetImportAttributes(node *ast.Node) *ast.Node +//go:linkname GetInitializerOfBinaryExpression github.com/microsoft/typescript-go/internal/ast.GetInitializerOfBinaryExpression +func GetInitializerOfBinaryExpression(expr *ast.BinaryExpression) *ast.Expression +//go:linkname GetInvokedExpression github.com/microsoft/typescript-go/internal/ast.GetInvokedExpression +func GetInvokedExpression(node *ast.Node) *ast.Node +//go:linkname GetJSDocDeprecatedTag github.com/microsoft/typescript-go/internal/ast.GetJSDocDeprecatedTag +func GetJSDocDeprecatedTag(node *ast.Node) *ast.Node +//go:linkname GetJSXImplicitImportBase github.com/microsoft/typescript-go/internal/ast.GetJSXImplicitImportBase +func GetJSXImplicitImportBase(compilerOptions *core.CompilerOptions, file *ast.SourceFile) string +//go:linkname GetJSXRuntimeImport github.com/microsoft/typescript-go/internal/ast.GetJSXRuntimeImport +func GetJSXRuntimeImport(base string, options *core.CompilerOptions) string +//go:linkname GetLeftmostAccessExpression github.com/microsoft/typescript-go/internal/ast.GetLeftmostAccessExpression +func GetLeftmostAccessExpression(expr *ast.Node) *ast.Node +//go:linkname GetLeftmostExpression github.com/microsoft/typescript-go/internal/ast.GetLeftmostExpression +func GetLeftmostExpression(node *ast.Expression, stopAtCallExpressions bool) *ast.Expression +//go:linkname GetLocals github.com/microsoft/typescript-go/internal/ast.GetLocals +func GetLocals(container *ast.Node) ast.SymbolTable +//go:linkname GetMeaningFromDeclaration github.com/microsoft/typescript-go/internal/ast.GetMeaningFromDeclaration +func GetMeaningFromDeclaration(node *ast.Node) ast.SemanticMeaning +//go:linkname GetMembers github.com/microsoft/typescript-go/internal/ast.GetMembers +func GetMembers(symbol *ast.Symbol) ast.SymbolTable +//go:linkname GetModuleInstanceState github.com/microsoft/typescript-go/internal/ast.GetModuleInstanceState +func GetModuleInstanceState(node *ast.Node) ast.ModuleInstanceState +//go:linkname GetModuleSpecifierOfBareOrAccessedRequire github.com/microsoft/typescript-go/internal/ast.GetModuleSpecifierOfBareOrAccessedRequire +func GetModuleSpecifierOfBareOrAccessedRequire(node *ast.Node) *ast.Node +//go:linkname GetNameOfDeclaration github.com/microsoft/typescript-go/internal/ast.GetNameOfDeclaration +func GetNameOfDeclaration(declaration *ast.Node) *ast.Node +//go:linkname GetNamespaceDeclarationNode github.com/microsoft/typescript-go/internal/ast.GetNamespaceDeclarationNode +func GetNamespaceDeclarationNode(node *ast.Node) *ast.Node +//go:linkname GetNewTargetContainer github.com/microsoft/typescript-go/internal/ast.GetNewTargetContainer +func GetNewTargetContainer(node *ast.Node) *ast.Node +//go:linkname GetNodeAtPosition github.com/microsoft/typescript-go/internal/ast.GetNodeAtPosition +func GetNodeAtPosition(file *ast.SourceFile, position int, includeJSDoc bool) *ast.Node +//go:linkname GetNodeId github.com/microsoft/typescript-go/internal/ast.GetNodeId +func GetNodeId(node *ast.Node) ast.NodeId +//go:linkname GetNonAssignedNameOfDeclaration github.com/microsoft/typescript-go/internal/ast.GetNonAssignedNameOfDeclaration +func GetNonAssignedNameOfDeclaration(declaration *ast.Node) *ast.Node +//go:linkname GetNonAugmentationDeclaration github.com/microsoft/typescript-go/internal/ast.GetNonAugmentationDeclaration +func GetNonAugmentationDeclaration(symbol *ast.Symbol) *ast.Node +//go:linkname GetOperatorPrecedence github.com/microsoft/typescript-go/internal/ast.GetOperatorPrecedence +func GetOperatorPrecedence(nodeKind ast.Kind, operatorKind ast.Kind, flags ast.OperatorPrecedenceFlags) ast.OperatorPrecedence +//go:linkname GetPragmaArgument github.com/microsoft/typescript-go/internal/ast.GetPragmaArgument +func GetPragmaArgument(pragma *ast.Pragma, name string) string +//go:linkname GetPragmaFromSourceFile github.com/microsoft/typescript-go/internal/ast.GetPragmaFromSourceFile +func GetPragmaFromSourceFile(file *ast.SourceFile, name string) *ast.Pragma +//go:linkname GetPropertyNameForPropertyNameNode github.com/microsoft/typescript-go/internal/ast.GetPropertyNameForPropertyNameNode +func GetPropertyNameForPropertyNameNode(name *ast.Node) string +//go:linkname GetReparsedNodeForNode github.com/microsoft/typescript-go/internal/ast.GetReparsedNodeForNode +func GetReparsedNodeForNode(node *ast.Node) *ast.Node +//go:linkname GetRestIndicatorOfBindingOrAssignmentElement github.com/microsoft/typescript-go/internal/ast.GetRestIndicatorOfBindingOrAssignmentElement +func GetRestIndicatorOfBindingOrAssignmentElement(bindingElement *ast.Node) *ast.Node +//go:linkname GetRestParameterElementType github.com/microsoft/typescript-go/internal/ast.GetRestParameterElementType +func GetRestParameterElementType(node *ast.ParameterDeclarationNode) *ast.Node +//go:linkname GetRightMostAssignedExpression github.com/microsoft/typescript-go/internal/ast.GetRightMostAssignedExpression +func GetRightMostAssignedExpression(node *ast.Node) *ast.Node +//go:linkname GetRootDeclaration github.com/microsoft/typescript-go/internal/ast.GetRootDeclaration +func GetRootDeclaration(node *ast.Node) *ast.Node +//go:linkname GetSemanticJsxChildren github.com/microsoft/typescript-go/internal/ast.GetSemanticJsxChildren +func GetSemanticJsxChildren(children []*ast.JsxChild) []*ast.JsxChild +//go:linkname GetSourceFileOfModule github.com/microsoft/typescript-go/internal/ast.GetSourceFileOfModule +func GetSourceFileOfModule(module *ast.Symbol) *ast.SourceFile +//go:linkname GetSourceFileOfNode github.com/microsoft/typescript-go/internal/ast.GetSourceFileOfNode +func GetSourceFileOfNode(node *ast.Node) *ast.SourceFile +//go:linkname GetSuperContainer github.com/microsoft/typescript-go/internal/ast.GetSuperContainer +func GetSuperContainer(node *ast.Node, stopOnFunctions bool) *ast.Node +//go:linkname GetSymbolId github.com/microsoft/typescript-go/internal/ast.GetSymbolId +func GetSymbolId(symbol *ast.Symbol) ast.SymbolId +//go:linkname GetSymbolTable github.com/microsoft/typescript-go/internal/ast.GetSymbolTable +func GetSymbolTable(data *ast.SymbolTable) ast.SymbolTable +//go:linkname GetTargetOfBindingOrAssignmentElement github.com/microsoft/typescript-go/internal/ast.GetTargetOfBindingOrAssignmentElement +func GetTargetOfBindingOrAssignmentElement(bindingElement *ast.Node) *ast.Node +//go:linkname GetTextOfPropertyName github.com/microsoft/typescript-go/internal/ast.GetTextOfPropertyName +func GetTextOfPropertyName(name *ast.Node) string +//go:linkname GetThisContainer github.com/microsoft/typescript-go/internal/ast.GetThisContainer +func GetThisContainer(node *ast.Node, includeArrowFunctions bool, includeClassComputedPropertyName bool) *ast.Node +//go:linkname GetThisParameter github.com/microsoft/typescript-go/internal/ast.GetThisParameter +func GetThisParameter(signature *ast.Node) *ast.Node +//go:linkname GetTypeAnnotationNode github.com/microsoft/typescript-go/internal/ast.GetTypeAnnotationNode +func GetTypeAnnotationNode(node *ast.Node) *ast.TypeNode +//go:linkname GetTypeNodePrecedence github.com/microsoft/typescript-go/internal/ast.GetTypeNodePrecedence +func GetTypeNodePrecedence(n *ast.TypeNode) ast.TypePrecedence +//go:linkname HasAbstractModifier github.com/microsoft/typescript-go/internal/ast.HasAbstractModifier +func HasAbstractModifier(node *ast.Node) bool +//go:linkname HasAccessorModifier github.com/microsoft/typescript-go/internal/ast.HasAccessorModifier +func HasAccessorModifier(node *ast.Node) bool +//go:linkname HasAmbientModifier github.com/microsoft/typescript-go/internal/ast.HasAmbientModifier +func HasAmbientModifier(node *ast.Node) bool +//go:linkname HasContextSensitiveParameters github.com/microsoft/typescript-go/internal/ast.HasContextSensitiveParameters +func HasContextSensitiveParameters(node *ast.Node) bool +//go:linkname HasDecorators github.com/microsoft/typescript-go/internal/ast.HasDecorators +func HasDecorators(node *ast.Node) bool +//go:linkname HasDynamicName github.com/microsoft/typescript-go/internal/ast.HasDynamicName +func HasDynamicName(declaration *ast.Node) bool +type HasFileName = ast.HasFileName +//go:linkname HasInferredType github.com/microsoft/typescript-go/internal/ast.HasInferredType +func HasInferredType(node *ast.Node) bool +//go:linkname HasInitializer github.com/microsoft/typescript-go/internal/ast.HasInitializer +func HasInitializer(node *ast.Node) bool +//go:linkname HasModifier github.com/microsoft/typescript-go/internal/ast.HasModifier +func HasModifier(node *ast.Node, flags ast.ModifierFlags) bool +//go:linkname HasQuestionToken github.com/microsoft/typescript-go/internal/ast.HasQuestionToken +func HasQuestionToken(node *ast.Node) bool +//go:linkname HasResolutionModeOverride github.com/microsoft/typescript-go/internal/ast.HasResolutionModeOverride +func HasResolutionModeOverride(node *ast.Node) bool +//go:linkname HasSamePropertyAccessName github.com/microsoft/typescript-go/internal/ast.HasSamePropertyAccessName +func HasSamePropertyAccessName(node1 *ast.Node, node2 *ast.Node) bool +//go:linkname HasStaticModifier github.com/microsoft/typescript-go/internal/ast.HasStaticModifier +func HasStaticModifier(node *ast.Node) bool +//go:linkname HasSyntacticModifier github.com/microsoft/typescript-go/internal/ast.HasSyntacticModifier +func HasSyntacticModifier(node *ast.Node, flags ast.ModifierFlags) bool +//go:linkname HasTypeArguments github.com/microsoft/typescript-go/internal/ast.HasTypeArguments +func HasTypeArguments(node *ast.Node) bool +type HeritageClause = ast.HeritageClause +type HeritageClauseList = ast.HeritageClauseList +type HeritageClauseNode = ast.HeritageClauseNode +type Identifier = ast.Identifier +type IdentifierNode = ast.IdentifierNode +type IfStatement = ast.IfStatement +type ImportAttribute = ast.ImportAttribute +type ImportAttributeList = ast.ImportAttributeList +type ImportAttributeName = ast.ImportAttributeName +type ImportAttributeNode = ast.ImportAttributeNode +type ImportAttributes = ast.ImportAttributes +type ImportAttributesNode = ast.ImportAttributesNode +type ImportClause = ast.ImportClause +type ImportClauseNode = ast.ImportClauseNode +type ImportClauseOrBindingPattern = ast.ImportClauseOrBindingPattern +type ImportDeclaration = ast.ImportDeclaration +type ImportEqualsDeclaration = ast.ImportEqualsDeclaration +//go:linkname ImportFromModuleSpecifier github.com/microsoft/typescript-go/internal/ast.ImportFromModuleSpecifier +func ImportFromModuleSpecifier(node *ast.Node) *ast.Node +type ImportSpecifier = ast.ImportSpecifier +type ImportSpecifierList = ast.ImportSpecifierList +type ImportSpecifierNode = ast.ImportSpecifierNode +type ImportTypeNode = ast.ImportTypeNode +//go:linkname IndexOfNode github.com/microsoft/typescript-go/internal/ast.IndexOfNode +func IndexOfNode(nodes []*ast.Node, node *ast.Node) int +type IndexSignatureDeclaration = ast.IndexSignatureDeclaration +type IndexedAccessTypeNode = ast.IndexedAccessTypeNode +type InferTypeNode = ast.InferTypeNode +type InterfaceDeclaration = ast.InterfaceDeclaration +const InternalSymbolNameAssignmentDeclaration = ast.InternalSymbolNameAssignmentDeclaration +const InternalSymbolNameCall = ast.InternalSymbolNameCall +const InternalSymbolNameClass = ast.InternalSymbolNameClass +const InternalSymbolNameComputed = ast.InternalSymbolNameComputed +const InternalSymbolNameConstructor = ast.InternalSymbolNameConstructor +const InternalSymbolNameDefault = ast.InternalSymbolNameDefault +const InternalSymbolNameExportEquals = ast.InternalSymbolNameExportEquals +const InternalSymbolNameExportStar = ast.InternalSymbolNameExportStar +const InternalSymbolNameFunction = ast.InternalSymbolNameFunction +const InternalSymbolNameGlobal = ast.InternalSymbolNameGlobal +const InternalSymbolNameImportAttributes = ast.InternalSymbolNameImportAttributes +const InternalSymbolNameIndex = ast.InternalSymbolNameIndex +const InternalSymbolNameInstantiationExpression = ast.InternalSymbolNameInstantiationExpression +const InternalSymbolNameJSXAttributes = ast.InternalSymbolNameJSXAttributes +const InternalSymbolNameMissing = ast.InternalSymbolNameMissing +const InternalSymbolNameModuleExports = ast.InternalSymbolNameModuleExports +const InternalSymbolNameNew = ast.InternalSymbolNameNew +const InternalSymbolNameObject = ast.InternalSymbolNameObject +const InternalSymbolNamePrefix = ast.InternalSymbolNamePrefix +const InternalSymbolNameThis = ast.InternalSymbolNameThis +const InternalSymbolNameType = ast.InternalSymbolNameType +type IntersectionTypeNode = ast.IntersectionTypeNode +//go:linkname IsAccessExpression github.com/microsoft/typescript-go/internal/ast.IsAccessExpression +func IsAccessExpression(node *ast.Node) bool +//go:linkname IsAccessor github.com/microsoft/typescript-go/internal/ast.IsAccessor +func IsAccessor(node *ast.Node) bool +//go:linkname IsAliasSymbolDeclaration github.com/microsoft/typescript-go/internal/ast.IsAliasSymbolDeclaration +func IsAliasSymbolDeclaration(node *ast.Node) bool +//go:linkname IsAmbientModule github.com/microsoft/typescript-go/internal/ast.IsAmbientModule +func IsAmbientModule(node *ast.Node) bool +//go:linkname IsAnyExportAssignment github.com/microsoft/typescript-go/internal/ast.IsAnyExportAssignment +func IsAnyExportAssignment(node *ast.Node) bool +//go:linkname IsAnyImportOrReExport github.com/microsoft/typescript-go/internal/ast.IsAnyImportOrReExport +func IsAnyImportOrReExport(node *ast.Node) bool +//go:linkname IsAnyImportSyntax github.com/microsoft/typescript-go/internal/ast.IsAnyImportSyntax +func IsAnyImportSyntax(node *ast.Node) bool +//go:linkname IsArgumentExpressionOfElementAccess github.com/microsoft/typescript-go/internal/ast.IsArgumentExpressionOfElementAccess +func IsArgumentExpressionOfElementAccess(node *ast.Node) bool +//go:linkname IsArrayBindingOrAssignmentElement github.com/microsoft/typescript-go/internal/ast.IsArrayBindingOrAssignmentElement +func IsArrayBindingOrAssignmentElement(node *ast.Node) bool +//go:linkname IsArrayBindingPattern github.com/microsoft/typescript-go/internal/ast.IsArrayBindingPattern +func IsArrayBindingPattern(node *ast.Node) bool +//go:linkname IsArrayLiteralExpression github.com/microsoft/typescript-go/internal/ast.IsArrayLiteralExpression +func IsArrayLiteralExpression(node *ast.Node) bool +//go:linkname IsArrayLiteralOrObjectLiteralDestructuringPattern github.com/microsoft/typescript-go/internal/ast.IsArrayLiteralOrObjectLiteralDestructuringPattern +func IsArrayLiteralOrObjectLiteralDestructuringPattern(node *ast.Node) bool +//go:linkname IsArrayTypeNode github.com/microsoft/typescript-go/internal/ast.IsArrayTypeNode +func IsArrayTypeNode(node *ast.Node) bool +//go:linkname IsArrowFunction github.com/microsoft/typescript-go/internal/ast.IsArrowFunction +func IsArrowFunction(node *ast.Node) bool +//go:linkname IsAsExpression github.com/microsoft/typescript-go/internal/ast.IsAsExpression +func IsAsExpression(node *ast.Node) bool +//go:linkname IsAssertionExpression github.com/microsoft/typescript-go/internal/ast.IsAssertionExpression +func IsAssertionExpression(node *ast.Node) bool +//go:linkname IsAssignmentExpression github.com/microsoft/typescript-go/internal/ast.IsAssignmentExpression +func IsAssignmentExpression(node *ast.Node, excludeCompoundAssignment bool) bool +//go:linkname IsAssignmentOperator github.com/microsoft/typescript-go/internal/ast.IsAssignmentOperator +func IsAssignmentOperator(token ast.Kind) bool +//go:linkname IsAssignmentPattern github.com/microsoft/typescript-go/internal/ast.IsAssignmentPattern +func IsAssignmentPattern(node *ast.Node) bool +//go:linkname IsAssignmentTarget github.com/microsoft/typescript-go/internal/ast.IsAssignmentTarget +func IsAssignmentTarget(node *ast.Node) bool +//go:linkname IsAsyncFunction github.com/microsoft/typescript-go/internal/ast.IsAsyncFunction +func IsAsyncFunction(node *ast.Node) bool +//go:linkname IsAutoAccessorPropertyDeclaration github.com/microsoft/typescript-go/internal/ast.IsAutoAccessorPropertyDeclaration +func IsAutoAccessorPropertyDeclaration(node *ast.Node) bool +//go:linkname IsAwaitExpression github.com/microsoft/typescript-go/internal/ast.IsAwaitExpression +func IsAwaitExpression(node *ast.Node) bool +//go:linkname IsBigIntLiteral github.com/microsoft/typescript-go/internal/ast.IsBigIntLiteral +func IsBigIntLiteral(node *ast.Node) bool +//go:linkname IsBinaryExpression github.com/microsoft/typescript-go/internal/ast.IsBinaryExpression +func IsBinaryExpression(node *ast.Node) bool +//go:linkname IsBindableObjectDefinePropertyCall github.com/microsoft/typescript-go/internal/ast.IsBindableObjectDefinePropertyCall +func IsBindableObjectDefinePropertyCall(node *ast.Node) bool +//go:linkname IsBindableStaticAccessExpression github.com/microsoft/typescript-go/internal/ast.IsBindableStaticAccessExpression +func IsBindableStaticAccessExpression(node *ast.Node, excludeThisKeyword bool) bool +//go:linkname IsBindableStaticElementAccessExpression github.com/microsoft/typescript-go/internal/ast.IsBindableStaticElementAccessExpression +func IsBindableStaticElementAccessExpression(node *ast.Node, excludeThisKeyword bool) bool +//go:linkname IsBindableStaticNameExpression github.com/microsoft/typescript-go/internal/ast.IsBindableStaticNameExpression +func IsBindableStaticNameExpression(node *ast.Node, excludeThisKeyword bool) bool +//go:linkname IsBindingElement github.com/microsoft/typescript-go/internal/ast.IsBindingElement +func IsBindingElement(node *ast.Node) bool +//go:linkname IsBindingPattern github.com/microsoft/typescript-go/internal/ast.IsBindingPattern +func IsBindingPattern(node *ast.Node) bool +//go:linkname IsBlock github.com/microsoft/typescript-go/internal/ast.IsBlock +func IsBlock(node *ast.Node) bool +//go:linkname IsBlockOrCatchScoped github.com/microsoft/typescript-go/internal/ast.IsBlockOrCatchScoped +func IsBlockOrCatchScoped(declaration *ast.Node) bool +//go:linkname IsBlockScope github.com/microsoft/typescript-go/internal/ast.IsBlockScope +func IsBlockScope(node *ast.Node, parentNode *ast.Node) bool +//go:linkname IsBooleanLiteral github.com/microsoft/typescript-go/internal/ast.IsBooleanLiteral +func IsBooleanLiteral(node *ast.Node) bool +//go:linkname IsBreakOrContinueStatement github.com/microsoft/typescript-go/internal/ast.IsBreakOrContinueStatement +func IsBreakOrContinueStatement(node *ast.Node) bool +//go:linkname IsBreakStatement github.com/microsoft/typescript-go/internal/ast.IsBreakStatement +func IsBreakStatement(node *ast.Node) bool +//go:linkname IsCallExpression github.com/microsoft/typescript-go/internal/ast.IsCallExpression +func IsCallExpression(node *ast.Node) bool +//go:linkname IsCallExpressionTarget github.com/microsoft/typescript-go/internal/ast.IsCallExpressionTarget +func IsCallExpressionTarget(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsCallLikeExpression github.com/microsoft/typescript-go/internal/ast.IsCallLikeExpression +func IsCallLikeExpression(node *ast.Node) bool +//go:linkname IsCallLikeOrFunctionLikeExpression github.com/microsoft/typescript-go/internal/ast.IsCallLikeOrFunctionLikeExpression +func IsCallLikeOrFunctionLikeExpression(node *ast.Node) bool +//go:linkname IsCallOrNewExpression github.com/microsoft/typescript-go/internal/ast.IsCallOrNewExpression +func IsCallOrNewExpression(node *ast.Node) bool +//go:linkname IsCallOrNewExpressionTarget github.com/microsoft/typescript-go/internal/ast.IsCallOrNewExpressionTarget +func IsCallOrNewExpressionTarget(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsCallSignatureDeclaration github.com/microsoft/typescript-go/internal/ast.IsCallSignatureDeclaration +func IsCallSignatureDeclaration(node *ast.Node) bool +//go:linkname IsCaseBlock github.com/microsoft/typescript-go/internal/ast.IsCaseBlock +func IsCaseBlock(node *ast.Node) bool +//go:linkname IsCaseClause github.com/microsoft/typescript-go/internal/ast.IsCaseClause +func IsCaseClause(node *ast.Node) bool +//go:linkname IsCatchClause github.com/microsoft/typescript-go/internal/ast.IsCatchClause +func IsCatchClause(node *ast.Node) bool +//go:linkname IsCatchClauseVariableDeclarationOrBindingElement github.com/microsoft/typescript-go/internal/ast.IsCatchClauseVariableDeclarationOrBindingElement +func IsCatchClauseVariableDeclarationOrBindingElement(declaration *ast.Node) bool +//go:linkname IsCheckJSEnabledForFile github.com/microsoft/typescript-go/internal/ast.IsCheckJSEnabledForFile +func IsCheckJSEnabledForFile(sourceFile *ast.SourceFile, compilerOptions *core.CompilerOptions) bool +//go:linkname IsClassDeclaration github.com/microsoft/typescript-go/internal/ast.IsClassDeclaration +func IsClassDeclaration(node *ast.Node) bool +//go:linkname IsClassElement github.com/microsoft/typescript-go/internal/ast.IsClassElement +func IsClassElement(node *ast.Node) bool +//go:linkname IsClassExpression github.com/microsoft/typescript-go/internal/ast.IsClassExpression +func IsClassExpression(node *ast.Node) bool +//go:linkname IsClassLike github.com/microsoft/typescript-go/internal/ast.IsClassLike +func IsClassLike(node *ast.Node) bool +//go:linkname IsClassMemberModifier github.com/microsoft/typescript-go/internal/ast.IsClassMemberModifier +func IsClassMemberModifier(token ast.Kind) bool +//go:linkname IsClassOrInterfaceLike github.com/microsoft/typescript-go/internal/ast.IsClassOrInterfaceLike +func IsClassOrInterfaceLike(node *ast.Node) bool +//go:linkname IsClassOrTypeElement github.com/microsoft/typescript-go/internal/ast.IsClassOrTypeElement +func IsClassOrTypeElement(node *ast.Node) bool +//go:linkname IsClassStaticBlockDeclaration github.com/microsoft/typescript-go/internal/ast.IsClassStaticBlockDeclaration +func IsClassStaticBlockDeclaration(node *ast.Node) bool +//go:linkname IsCommaExpression github.com/microsoft/typescript-go/internal/ast.IsCommaExpression +func IsCommaExpression(node *ast.Node) bool +//go:linkname IsCommaSequence github.com/microsoft/typescript-go/internal/ast.IsCommaSequence +func IsCommaSequence(node *ast.Node) bool +//go:linkname IsCommonJSExport github.com/microsoft/typescript-go/internal/ast.IsCommonJSExport +func IsCommonJSExport(node *ast.Node) bool +//go:linkname IsCompoundAssignment github.com/microsoft/typescript-go/internal/ast.IsCompoundAssignment +func IsCompoundAssignment(token ast.Kind) bool +//go:linkname IsComputedNonLiteralName github.com/microsoft/typescript-go/internal/ast.IsComputedNonLiteralName +func IsComputedNonLiteralName(name *ast.Node) bool +//go:linkname IsComputedPropertyName github.com/microsoft/typescript-go/internal/ast.IsComputedPropertyName +func IsComputedPropertyName(node *ast.Node) bool +//go:linkname IsConditionalExpression github.com/microsoft/typescript-go/internal/ast.IsConditionalExpression +func IsConditionalExpression(node *ast.Node) bool +//go:linkname IsConditionalTypeNode github.com/microsoft/typescript-go/internal/ast.IsConditionalTypeNode +func IsConditionalTypeNode(node *ast.Node) bool +//go:linkname IsConstAssertion github.com/microsoft/typescript-go/internal/ast.IsConstAssertion +func IsConstAssertion(node *ast.Node) bool +//go:linkname IsConstTypeReference github.com/microsoft/typescript-go/internal/ast.IsConstTypeReference +func IsConstTypeReference(node *ast.Node) bool +//go:linkname IsConstructSignatureDeclaration github.com/microsoft/typescript-go/internal/ast.IsConstructSignatureDeclaration +func IsConstructSignatureDeclaration(node *ast.Node) bool +//go:linkname IsConstructorDeclaration github.com/microsoft/typescript-go/internal/ast.IsConstructorDeclaration +func IsConstructorDeclaration(node *ast.Node) bool +//go:linkname IsConstructorTypeNode github.com/microsoft/typescript-go/internal/ast.IsConstructorTypeNode +func IsConstructorTypeNode(node *ast.Node) bool +//go:linkname IsContextualKeyword github.com/microsoft/typescript-go/internal/ast.IsContextualKeyword +func IsContextualKeyword(token ast.Kind) bool +//go:linkname IsContinueStatement github.com/microsoft/typescript-go/internal/ast.IsContinueStatement +func IsContinueStatement(node *ast.Node) bool +//go:linkname IsDebuggerStatement github.com/microsoft/typescript-go/internal/ast.IsDebuggerStatement +func IsDebuggerStatement(node *ast.Node) bool +//go:linkname IsDeclaration github.com/microsoft/typescript-go/internal/ast.IsDeclaration +func IsDeclaration(node *ast.Node) bool +//go:linkname IsDeclarationBindingElement github.com/microsoft/typescript-go/internal/ast.IsDeclarationBindingElement +func IsDeclarationBindingElement(bindingElement *ast.Node) bool +//go:linkname IsDeclarationName github.com/microsoft/typescript-go/internal/ast.IsDeclarationName +func IsDeclarationName(name *ast.Node) bool +//go:linkname IsDeclarationNameOrImportPropertyName github.com/microsoft/typescript-go/internal/ast.IsDeclarationNameOrImportPropertyName +func IsDeclarationNameOrImportPropertyName(name *ast.Node) bool +//go:linkname IsDeclarationNode github.com/microsoft/typescript-go/internal/ast.IsDeclarationNode +func IsDeclarationNode(node *ast.Node) bool +//go:linkname IsDeclarationStatement github.com/microsoft/typescript-go/internal/ast.IsDeclarationStatement +func IsDeclarationStatement(node *ast.Node) bool +//go:linkname IsDecorator github.com/microsoft/typescript-go/internal/ast.IsDecorator +func IsDecorator(node *ast.Node) bool +//go:linkname IsDecoratorTarget github.com/microsoft/typescript-go/internal/ast.IsDecoratorTarget +func IsDecoratorTarget(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsDefaultClause github.com/microsoft/typescript-go/internal/ast.IsDefaultClause +func IsDefaultClause(node *ast.Node) bool +//go:linkname IsDefaultImport github.com/microsoft/typescript-go/internal/ast.IsDefaultImport +func IsDefaultImport(node *ast.Node) bool +//go:linkname IsDeleteExpression github.com/microsoft/typescript-go/internal/ast.IsDeleteExpression +func IsDeleteExpression(node *ast.Node) bool +//go:linkname IsDeprecatedDeclaration github.com/microsoft/typescript-go/internal/ast.IsDeprecatedDeclaration +func IsDeprecatedDeclaration(declaration *ast.Node) bool +//go:linkname IsDeprecatedDeclarationWithCachedFlags github.com/microsoft/typescript-go/internal/ast.IsDeprecatedDeclarationWithCachedFlags +func IsDeprecatedDeclarationWithCachedFlags(declaration *ast.Node, combinedFlags ast.NodeFlags) bool +//go:linkname IsDestructuringAssignment github.com/microsoft/typescript-go/internal/ast.IsDestructuringAssignment +func IsDestructuringAssignment(node *ast.Node) bool +//go:linkname IsDoStatement github.com/microsoft/typescript-go/internal/ast.IsDoStatement +func IsDoStatement(node *ast.Node) bool +//go:linkname IsDottedName github.com/microsoft/typescript-go/internal/ast.IsDottedName +func IsDottedName(node *ast.Node) bool +//go:linkname IsDynamicName github.com/microsoft/typescript-go/internal/ast.IsDynamicName +func IsDynamicName(name *ast.Node) bool +//go:linkname IsEffectiveExternalModule github.com/microsoft/typescript-go/internal/ast.IsEffectiveExternalModule +func IsEffectiveExternalModule(node *ast.SourceFile, compilerOptions *core.CompilerOptions) bool +//go:linkname IsElementAccessExpression github.com/microsoft/typescript-go/internal/ast.IsElementAccessExpression +func IsElementAccessExpression(node *ast.Node) bool +//go:linkname IsEmittableImport github.com/microsoft/typescript-go/internal/ast.IsEmittableImport +func IsEmittableImport(node *ast.Node) bool +//go:linkname IsEmptyArrayLiteral github.com/microsoft/typescript-go/internal/ast.IsEmptyArrayLiteral +func IsEmptyArrayLiteral(expression *ast.Node) bool +//go:linkname IsEmptyObjectLiteral github.com/microsoft/typescript-go/internal/ast.IsEmptyObjectLiteral +func IsEmptyObjectLiteral(expression *ast.Node) bool +//go:linkname IsEmptyStatement github.com/microsoft/typescript-go/internal/ast.IsEmptyStatement +func IsEmptyStatement(node *ast.Node) bool +//go:linkname IsEntityName github.com/microsoft/typescript-go/internal/ast.IsEntityName +func IsEntityName(node *ast.Node) bool +//go:linkname IsEntityNameExpression github.com/microsoft/typescript-go/internal/ast.IsEntityNameExpression +func IsEntityNameExpression(node *ast.Node) bool +//go:linkname IsEntityNameExpressionEx github.com/microsoft/typescript-go/internal/ast.IsEntityNameExpressionEx +func IsEntityNameExpressionEx(node *ast.Node, allowJS bool) bool +//go:linkname IsEnumConst github.com/microsoft/typescript-go/internal/ast.IsEnumConst +func IsEnumConst(node *ast.Node) bool +//go:linkname IsEnumDeclaration github.com/microsoft/typescript-go/internal/ast.IsEnumDeclaration +func IsEnumDeclaration(node *ast.Node) bool +//go:linkname IsEnumMember github.com/microsoft/typescript-go/internal/ast.IsEnumMember +func IsEnumMember(node *ast.Node) bool +//go:linkname IsExclusivelyTypeOnlyImportOrExport github.com/microsoft/typescript-go/internal/ast.IsExclusivelyTypeOnlyImportOrExport +func IsExclusivelyTypeOnlyImportOrExport(node *ast.Node) bool +//go:linkname IsExpandoInitializer github.com/microsoft/typescript-go/internal/ast.IsExpandoInitializer +func IsExpandoInitializer(initializer *ast.Node) bool +//go:linkname IsExpandoPropertyDeclaration github.com/microsoft/typescript-go/internal/ast.IsExpandoPropertyDeclaration +func IsExpandoPropertyDeclaration(node *ast.Node) bool +//go:linkname IsExportAssignment github.com/microsoft/typescript-go/internal/ast.IsExportAssignment +func IsExportAssignment(node *ast.Node) bool +//go:linkname IsExportDeclaration github.com/microsoft/typescript-go/internal/ast.IsExportDeclaration +func IsExportDeclaration(node *ast.Node) bool +//go:linkname IsExportNamespaceAsDefaultDeclaration github.com/microsoft/typescript-go/internal/ast.IsExportNamespaceAsDefaultDeclaration +func IsExportNamespaceAsDefaultDeclaration(node *ast.Node) bool +//go:linkname IsExportSpecifier github.com/microsoft/typescript-go/internal/ast.IsExportSpecifier +func IsExportSpecifier(node *ast.Node) bool +//go:linkname IsExportsIdentifier github.com/microsoft/typescript-go/internal/ast.IsExportsIdentifier +func IsExportsIdentifier(node *ast.Node) bool +//go:linkname IsExpression github.com/microsoft/typescript-go/internal/ast.IsExpression +func IsExpression(node *ast.Node) bool +//go:linkname IsExpressionNode github.com/microsoft/typescript-go/internal/ast.IsExpressionNode +func IsExpressionNode(node *ast.Node) bool +//go:linkname IsExpressionOfOptionalChainRoot github.com/microsoft/typescript-go/internal/ast.IsExpressionOfOptionalChainRoot +func IsExpressionOfOptionalChainRoot(node *ast.Node) bool +//go:linkname IsExpressionStatement github.com/microsoft/typescript-go/internal/ast.IsExpressionStatement +func IsExpressionStatement(node *ast.Node) bool +//go:linkname IsExpressionWithTypeArguments github.com/microsoft/typescript-go/internal/ast.IsExpressionWithTypeArguments +func IsExpressionWithTypeArguments(node *ast.Node) bool +//go:linkname IsExpressionWithTypeArgumentsInClassExtendsClause github.com/microsoft/typescript-go/internal/ast.IsExpressionWithTypeArgumentsInClassExtendsClause +func IsExpressionWithTypeArgumentsInClassExtendsClause(node *ast.Node) bool +//go:linkname IsExternalModule github.com/microsoft/typescript-go/internal/ast.IsExternalModule +func IsExternalModule(file *ast.SourceFile) bool +//go:linkname IsExternalModuleAugmentation github.com/microsoft/typescript-go/internal/ast.IsExternalModuleAugmentation +func IsExternalModuleAugmentation(node *ast.Node) bool +//go:linkname IsExternalModuleImportEqualsDeclaration github.com/microsoft/typescript-go/internal/ast.IsExternalModuleImportEqualsDeclaration +func IsExternalModuleImportEqualsDeclaration(node *ast.Node) bool +//go:linkname IsExternalModuleIndicator github.com/microsoft/typescript-go/internal/ast.IsExternalModuleIndicator +func IsExternalModuleIndicator(node *ast.Statement) bool +//go:linkname IsExternalModuleReference github.com/microsoft/typescript-go/internal/ast.IsExternalModuleReference +func IsExternalModuleReference(node *ast.Node) bool +//go:linkname IsExternalOrCommonJSModule github.com/microsoft/typescript-go/internal/ast.IsExternalOrCommonJSModule +func IsExternalOrCommonJSModule(file *ast.SourceFile) bool +//go:linkname IsForInOrOfStatement github.com/microsoft/typescript-go/internal/ast.IsForInOrOfStatement +func IsForInOrOfStatement(node *ast.Node) bool +//go:linkname IsForInStatement github.com/microsoft/typescript-go/internal/ast.IsForInStatement +func IsForInStatement(node *ast.Node) bool +//go:linkname IsForOfStatement github.com/microsoft/typescript-go/internal/ast.IsForOfStatement +func IsForOfStatement(node *ast.Node) bool +//go:linkname IsForStatement github.com/microsoft/typescript-go/internal/ast.IsForStatement +func IsForStatement(node *ast.Node) bool +//go:linkname IsFunctionBlock github.com/microsoft/typescript-go/internal/ast.IsFunctionBlock +func IsFunctionBlock(node *ast.Node) bool +//go:linkname IsFunctionDeclaration github.com/microsoft/typescript-go/internal/ast.IsFunctionDeclaration +func IsFunctionDeclaration(node *ast.Node) bool +//go:linkname IsFunctionExpression github.com/microsoft/typescript-go/internal/ast.IsFunctionExpression +func IsFunctionExpression(node *ast.Node) bool +//go:linkname IsFunctionExpressionOrArrowFunction github.com/microsoft/typescript-go/internal/ast.IsFunctionExpressionOrArrowFunction +func IsFunctionExpressionOrArrowFunction(node *ast.Node) bool +//go:linkname IsFunctionLike github.com/microsoft/typescript-go/internal/ast.IsFunctionLike +func IsFunctionLike(node *ast.Node) bool +//go:linkname IsFunctionLikeDeclaration github.com/microsoft/typescript-go/internal/ast.IsFunctionLikeDeclaration +func IsFunctionLikeDeclaration(node *ast.Node) bool +//go:linkname IsFunctionLikeKind github.com/microsoft/typescript-go/internal/ast.IsFunctionLikeKind +func IsFunctionLikeKind(kind ast.Kind) bool +//go:linkname IsFunctionLikeOrClassStaticBlockDeclaration github.com/microsoft/typescript-go/internal/ast.IsFunctionLikeOrClassStaticBlockDeclaration +func IsFunctionLikeOrClassStaticBlockDeclaration(node *ast.Node) bool +//go:linkname IsFunctionOrModuleBlock github.com/microsoft/typescript-go/internal/ast.IsFunctionOrModuleBlock +func IsFunctionOrModuleBlock(node *ast.Node) bool +//go:linkname IsFunctionOrSourceFile github.com/microsoft/typescript-go/internal/ast.IsFunctionOrSourceFile +func IsFunctionOrSourceFile(node *ast.Node) bool +//go:linkname IsFunctionTypeNode github.com/microsoft/typescript-go/internal/ast.IsFunctionTypeNode +func IsFunctionTypeNode(node *ast.Node) bool +//go:linkname IsGetAccessorDeclaration github.com/microsoft/typescript-go/internal/ast.IsGetAccessorDeclaration +func IsGetAccessorDeclaration(node *ast.Node) bool +//go:linkname IsGlobalScopeAugmentation github.com/microsoft/typescript-go/internal/ast.IsGlobalScopeAugmentation +func IsGlobalScopeAugmentation(node *ast.Node) bool +//go:linkname IsGlobalSourceFile github.com/microsoft/typescript-go/internal/ast.IsGlobalSourceFile +func IsGlobalSourceFile(node *ast.Node) bool +//go:linkname IsHeritageClause github.com/microsoft/typescript-go/internal/ast.IsHeritageClause +func IsHeritageClause(node *ast.Node) bool +//go:linkname IsIdentifier github.com/microsoft/typescript-go/internal/ast.IsIdentifier +func IsIdentifier(node *ast.Node) bool +//go:linkname IsIdentifierName github.com/microsoft/typescript-go/internal/ast.IsIdentifierName +func IsIdentifierName(node *ast.Node) bool +//go:linkname IsIfStatement github.com/microsoft/typescript-go/internal/ast.IsIfStatement +func IsIfStatement(node *ast.Node) bool +//go:linkname IsImplicitlyExportedJSTypeAlias github.com/microsoft/typescript-go/internal/ast.IsImplicitlyExportedJSTypeAlias +func IsImplicitlyExportedJSTypeAlias(node *ast.Node) bool +//go:linkname IsImportAttribute github.com/microsoft/typescript-go/internal/ast.IsImportAttribute +func IsImportAttribute(node *ast.Node) bool +//go:linkname IsImportAttributes github.com/microsoft/typescript-go/internal/ast.IsImportAttributes +func IsImportAttributes(node *ast.Node) bool +//go:linkname IsImportCall github.com/microsoft/typescript-go/internal/ast.IsImportCall +func IsImportCall(node *ast.Node) bool +//go:linkname IsImportClause github.com/microsoft/typescript-go/internal/ast.IsImportClause +func IsImportClause(node *ast.Node) bool +//go:linkname IsImportDeclaration github.com/microsoft/typescript-go/internal/ast.IsImportDeclaration +func IsImportDeclaration(node *ast.Node) bool +//go:linkname IsImportDeclarationOrJSImportDeclaration github.com/microsoft/typescript-go/internal/ast.IsImportDeclarationOrJSImportDeclaration +func IsImportDeclarationOrJSImportDeclaration(node *ast.Node) bool +//go:linkname IsImportEqualsDeclaration github.com/microsoft/typescript-go/internal/ast.IsImportEqualsDeclaration +func IsImportEqualsDeclaration(node *ast.Node) bool +//go:linkname IsImportMeta github.com/microsoft/typescript-go/internal/ast.IsImportMeta +func IsImportMeta(node *ast.Node) bool +//go:linkname IsImportNode github.com/microsoft/typescript-go/internal/ast.IsImportNode +func IsImportNode(node *ast.Node) bool +//go:linkname IsImportOrExportSpecifier github.com/microsoft/typescript-go/internal/ast.IsImportOrExportSpecifier +func IsImportOrExportSpecifier(node *ast.Node) bool +//go:linkname IsImportOrImportEqualsDeclaration github.com/microsoft/typescript-go/internal/ast.IsImportOrImportEqualsDeclaration +func IsImportOrImportEqualsDeclaration(node *ast.Node) bool +//go:linkname IsImportSpecifier github.com/microsoft/typescript-go/internal/ast.IsImportSpecifier +func IsImportSpecifier(node *ast.Node) bool +//go:linkname IsImportTypeNode github.com/microsoft/typescript-go/internal/ast.IsImportTypeNode +func IsImportTypeNode(node *ast.Node) bool +//go:linkname IsInExpressionContext github.com/microsoft/typescript-go/internal/ast.IsInExpressionContext +func IsInExpressionContext(node *ast.Node) bool +//go:linkname IsInJSFile github.com/microsoft/typescript-go/internal/ast.IsInJSFile +func IsInJSFile(node *ast.Node) bool +//go:linkname IsInJsonFile github.com/microsoft/typescript-go/internal/ast.IsInJsonFile +func IsInJsonFile(node *ast.Node) bool +//go:linkname IsInTopLevelContext github.com/microsoft/typescript-go/internal/ast.IsInTopLevelContext +func IsInTopLevelContext(node *ast.Node) bool +//go:linkname IsIndexSignatureDeclaration github.com/microsoft/typescript-go/internal/ast.IsIndexSignatureDeclaration +func IsIndexSignatureDeclaration(node *ast.Node) bool +//go:linkname IsIndexedAccessTypeNode github.com/microsoft/typescript-go/internal/ast.IsIndexedAccessTypeNode +func IsIndexedAccessTypeNode(node *ast.Node) bool +//go:linkname IsInferTypeNode github.com/microsoft/typescript-go/internal/ast.IsInferTypeNode +func IsInferTypeNode(node *ast.Node) bool +//go:linkname IsInfinityOrNaNString github.com/microsoft/typescript-go/internal/ast.IsInfinityOrNaNString +func IsInfinityOrNaNString(name string) bool +//go:linkname IsInitializedProperty github.com/microsoft/typescript-go/internal/ast.IsInitializedProperty +func IsInitializedProperty(member *ast.ClassElement) bool +//go:linkname IsInstanceOfExpression github.com/microsoft/typescript-go/internal/ast.IsInstanceOfExpression +func IsInstanceOfExpression(node *ast.Node) bool +//go:linkname IsInstantiatedModule github.com/microsoft/typescript-go/internal/ast.IsInstantiatedModule +func IsInstantiatedModule(node *ast.Node, preserveConstEnums bool) bool +//go:linkname IsInterfaceDeclaration github.com/microsoft/typescript-go/internal/ast.IsInterfaceDeclaration +func IsInterfaceDeclaration(node *ast.Node) bool +//go:linkname IsInternalModuleImportEqualsDeclaration github.com/microsoft/typescript-go/internal/ast.IsInternalModuleImportEqualsDeclaration +func IsInternalModuleImportEqualsDeclaration(node *ast.Node) bool +//go:linkname IsIntersectionTypeNode github.com/microsoft/typescript-go/internal/ast.IsIntersectionTypeNode +func IsIntersectionTypeNode(node *ast.Node) bool +//go:linkname IsIterationStatement github.com/microsoft/typescript-go/internal/ast.IsIterationStatement +func IsIterationStatement(node *ast.Node, lookInLabeledStatements bool) bool +//go:linkname IsJSDocAllType github.com/microsoft/typescript-go/internal/ast.IsJSDocAllType +func IsJSDocAllType(node *ast.Node) bool +//go:linkname IsJSDocAugmentsTag github.com/microsoft/typescript-go/internal/ast.IsJSDocAugmentsTag +func IsJSDocAugmentsTag(node *ast.Node) bool +//go:linkname IsJSDocCallbackTag github.com/microsoft/typescript-go/internal/ast.IsJSDocCallbackTag +func IsJSDocCallbackTag(node *ast.Node) bool +//go:linkname IsJSDocDeprecatedTag github.com/microsoft/typescript-go/internal/ast.IsJSDocDeprecatedTag +func IsJSDocDeprecatedTag(node *ast.Node) bool +//go:linkname IsJSDocImplementsTag github.com/microsoft/typescript-go/internal/ast.IsJSDocImplementsTag +func IsJSDocImplementsTag(node *ast.Node) bool +//go:linkname IsJSDocImportTag github.com/microsoft/typescript-go/internal/ast.IsJSDocImportTag +func IsJSDocImportTag(node *ast.Node) bool +//go:linkname IsJSDocKind github.com/microsoft/typescript-go/internal/ast.IsJSDocKind +func IsJSDocKind(kind ast.Kind) bool +//go:linkname IsJSDocLink github.com/microsoft/typescript-go/internal/ast.IsJSDocLink +func IsJSDocLink(node *ast.Node) bool +//go:linkname IsJSDocLinkCode github.com/microsoft/typescript-go/internal/ast.IsJSDocLinkCode +func IsJSDocLinkCode(node *ast.Node) bool +//go:linkname IsJSDocLinkLike github.com/microsoft/typescript-go/internal/ast.IsJSDocLinkLike +func IsJSDocLinkLike(node *ast.Node) bool +//go:linkname IsJSDocLinkPlain github.com/microsoft/typescript-go/internal/ast.IsJSDocLinkPlain +func IsJSDocLinkPlain(node *ast.Node) bool +//go:linkname IsJSDocNameReference github.com/microsoft/typescript-go/internal/ast.IsJSDocNameReference +func IsJSDocNameReference(node *ast.Node) bool +//go:linkname IsJSDocNameReferenceContext github.com/microsoft/typescript-go/internal/ast.IsJSDocNameReferenceContext +func IsJSDocNameReferenceContext(node *ast.Node) bool +//go:linkname IsJSDocNode github.com/microsoft/typescript-go/internal/ast.IsJSDocNode +func IsJSDocNode(node *ast.Node) bool +//go:linkname IsJSDocNonNullableType github.com/microsoft/typescript-go/internal/ast.IsJSDocNonNullableType +func IsJSDocNonNullableType(node *ast.Node) bool +//go:linkname IsJSDocNullableType github.com/microsoft/typescript-go/internal/ast.IsJSDocNullableType +func IsJSDocNullableType(node *ast.Node) bool +//go:linkname IsJSDocOptionalType github.com/microsoft/typescript-go/internal/ast.IsJSDocOptionalType +func IsJSDocOptionalType(node *ast.Node) bool +//go:linkname IsJSDocOverloadTag github.com/microsoft/typescript-go/internal/ast.IsJSDocOverloadTag +func IsJSDocOverloadTag(node *ast.Node) bool +//go:linkname IsJSDocOverrideTag github.com/microsoft/typescript-go/internal/ast.IsJSDocOverrideTag +func IsJSDocOverrideTag(node *ast.Node) bool +//go:linkname IsJSDocParameterTag github.com/microsoft/typescript-go/internal/ast.IsJSDocParameterTag +func IsJSDocParameterTag(node *ast.Node) bool +//go:linkname IsJSDocPrivateTag github.com/microsoft/typescript-go/internal/ast.IsJSDocPrivateTag +func IsJSDocPrivateTag(node *ast.Node) bool +//go:linkname IsJSDocPropertyTag github.com/microsoft/typescript-go/internal/ast.IsJSDocPropertyTag +func IsJSDocPropertyTag(node *ast.Node) bool +//go:linkname IsJSDocProtectedTag github.com/microsoft/typescript-go/internal/ast.IsJSDocProtectedTag +func IsJSDocProtectedTag(node *ast.Node) bool +//go:linkname IsJSDocPublicTag github.com/microsoft/typescript-go/internal/ast.IsJSDocPublicTag +func IsJSDocPublicTag(node *ast.Node) bool +//go:linkname IsJSDocReadonlyTag github.com/microsoft/typescript-go/internal/ast.IsJSDocReadonlyTag +func IsJSDocReadonlyTag(node *ast.Node) bool +//go:linkname IsJSDocReturnTag github.com/microsoft/typescript-go/internal/ast.IsJSDocReturnTag +func IsJSDocReturnTag(node *ast.Node) bool +//go:linkname IsJSDocSatisfiesTag github.com/microsoft/typescript-go/internal/ast.IsJSDocSatisfiesTag +func IsJSDocSatisfiesTag(node *ast.Node) bool +//go:linkname IsJSDocSeeTag github.com/microsoft/typescript-go/internal/ast.IsJSDocSeeTag +func IsJSDocSeeTag(node *ast.Node) bool +//go:linkname IsJSDocSignature github.com/microsoft/typescript-go/internal/ast.IsJSDocSignature +func IsJSDocSignature(node *ast.Node) bool +//go:linkname IsJSDocSingleCommentNode github.com/microsoft/typescript-go/internal/ast.IsJSDocSingleCommentNode +func IsJSDocSingleCommentNode(node *ast.Node) bool +//go:linkname IsJSDocSingleCommentNodeComment github.com/microsoft/typescript-go/internal/ast.IsJSDocSingleCommentNodeComment +func IsJSDocSingleCommentNodeComment(node *ast.Node) bool +//go:linkname IsJSDocSingleCommentNodeList github.com/microsoft/typescript-go/internal/ast.IsJSDocSingleCommentNodeList +func IsJSDocSingleCommentNodeList(nodeList *ast.NodeList) bool +//go:linkname IsJSDocTag github.com/microsoft/typescript-go/internal/ast.IsJSDocTag +func IsJSDocTag(node *ast.Node) bool +//go:linkname IsJSDocTemplateTag github.com/microsoft/typescript-go/internal/ast.IsJSDocTemplateTag +func IsJSDocTemplateTag(n *ast.Node) bool +//go:linkname IsJSDocText github.com/microsoft/typescript-go/internal/ast.IsJSDocText +func IsJSDocText(node *ast.Node) bool +//go:linkname IsJSDocThisTag github.com/microsoft/typescript-go/internal/ast.IsJSDocThisTag +func IsJSDocThisTag(node *ast.Node) bool +//go:linkname IsJSDocThrowsTag github.com/microsoft/typescript-go/internal/ast.IsJSDocThrowsTag +func IsJSDocThrowsTag(node *ast.Node) bool +//go:linkname IsJSDocTypeAssertion github.com/microsoft/typescript-go/internal/ast.IsJSDocTypeAssertion +func IsJSDocTypeAssertion(node *ast.Node) bool +//go:linkname IsJSDocTypeExpression github.com/microsoft/typescript-go/internal/ast.IsJSDocTypeExpression +func IsJSDocTypeExpression(node *ast.Node) bool +//go:linkname IsJSDocTypeLiteral github.com/microsoft/typescript-go/internal/ast.IsJSDocTypeLiteral +func IsJSDocTypeLiteral(node *ast.Node) bool +//go:linkname IsJSDocTypeTag github.com/microsoft/typescript-go/internal/ast.IsJSDocTypeTag +func IsJSDocTypeTag(node *ast.Node) bool +//go:linkname IsJSDocTypedefTag github.com/microsoft/typescript-go/internal/ast.IsJSDocTypedefTag +func IsJSDocTypedefTag(node *ast.Node) bool +//go:linkname IsJSDocUnknownTag github.com/microsoft/typescript-go/internal/ast.IsJSDocUnknownTag +func IsJSDocUnknownTag(node *ast.Node) bool +//go:linkname IsJSDocVariadicType github.com/microsoft/typescript-go/internal/ast.IsJSDocVariadicType +func IsJSDocVariadicType(node *ast.Node) bool +//go:linkname IsJSExportAssignment github.com/microsoft/typescript-go/internal/ast.IsJSExportAssignment +func IsJSExportAssignment(node *ast.Node) bool +//go:linkname IsJSImportDeclaration github.com/microsoft/typescript-go/internal/ast.IsJSImportDeclaration +func IsJSImportDeclaration(node *ast.Node) bool +//go:linkname IsJSTypeAliasDeclaration github.com/microsoft/typescript-go/internal/ast.IsJSTypeAliasDeclaration +func IsJSTypeAliasDeclaration(node *ast.Node) bool +//go:linkname IsJsonSourceFile github.com/microsoft/typescript-go/internal/ast.IsJsonSourceFile +func IsJsonSourceFile(file *ast.SourceFile) bool +//go:linkname IsJsxAttribute github.com/microsoft/typescript-go/internal/ast.IsJsxAttribute +func IsJsxAttribute(node *ast.Node) bool +//go:linkname IsJsxAttributeLike github.com/microsoft/typescript-go/internal/ast.IsJsxAttributeLike +func IsJsxAttributeLike(node *ast.Node) bool +//go:linkname IsJsxAttributes github.com/microsoft/typescript-go/internal/ast.IsJsxAttributes +func IsJsxAttributes(node *ast.Node) bool +//go:linkname IsJsxCallLike github.com/microsoft/typescript-go/internal/ast.IsJsxCallLike +func IsJsxCallLike(node *ast.Node) bool +//go:linkname IsJsxChild github.com/microsoft/typescript-go/internal/ast.IsJsxChild +func IsJsxChild(node *ast.Node) bool +//go:linkname IsJsxClosingElement github.com/microsoft/typescript-go/internal/ast.IsJsxClosingElement +func IsJsxClosingElement(node *ast.Node) bool +//go:linkname IsJsxElement github.com/microsoft/typescript-go/internal/ast.IsJsxElement +func IsJsxElement(node *ast.Node) bool +//go:linkname IsJsxExpression github.com/microsoft/typescript-go/internal/ast.IsJsxExpression +func IsJsxExpression(node *ast.Node) bool +//go:linkname IsJsxFragment github.com/microsoft/typescript-go/internal/ast.IsJsxFragment +func IsJsxFragment(node *ast.Node) bool +//go:linkname IsJsxNamespacedName github.com/microsoft/typescript-go/internal/ast.IsJsxNamespacedName +func IsJsxNamespacedName(node *ast.Node) bool +//go:linkname IsJsxOpeningElement github.com/microsoft/typescript-go/internal/ast.IsJsxOpeningElement +func IsJsxOpeningElement(node *ast.Node) bool +//go:linkname IsJsxOpeningFragment github.com/microsoft/typescript-go/internal/ast.IsJsxOpeningFragment +func IsJsxOpeningFragment(node *ast.Node) bool +//go:linkname IsJsxOpeningLikeElement github.com/microsoft/typescript-go/internal/ast.IsJsxOpeningLikeElement +func IsJsxOpeningLikeElement(node *ast.Node) bool +//go:linkname IsJsxOpeningLikeElementTagName github.com/microsoft/typescript-go/internal/ast.IsJsxOpeningLikeElementTagName +func IsJsxOpeningLikeElementTagName(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsJsxSelfClosingElement github.com/microsoft/typescript-go/internal/ast.IsJsxSelfClosingElement +func IsJsxSelfClosingElement(node *ast.Node) bool +//go:linkname IsJsxSpreadAttribute github.com/microsoft/typescript-go/internal/ast.IsJsxSpreadAttribute +func IsJsxSpreadAttribute(node *ast.Node) bool +//go:linkname IsJsxTagName github.com/microsoft/typescript-go/internal/ast.IsJsxTagName +func IsJsxTagName(node *ast.Node) bool +//go:linkname IsJsxText github.com/microsoft/typescript-go/internal/ast.IsJsxText +func IsJsxText(node *ast.Node) bool +//go:linkname IsJumpStatementTarget github.com/microsoft/typescript-go/internal/ast.IsJumpStatementTarget +func IsJumpStatementTarget(node *ast.Node) bool +//go:linkname IsKeyword github.com/microsoft/typescript-go/internal/ast.IsKeyword +func IsKeyword(token ast.Kind) bool +//go:linkname IsKeywordKind github.com/microsoft/typescript-go/internal/ast.IsKeywordKind +func IsKeywordKind(token ast.Kind) bool +//go:linkname IsLabelName github.com/microsoft/typescript-go/internal/ast.IsLabelName +func IsLabelName(node *ast.Node) bool +//go:linkname IsLabelOfLabeledStatement github.com/microsoft/typescript-go/internal/ast.IsLabelOfLabeledStatement +func IsLabelOfLabeledStatement(node *ast.Node) bool +//go:linkname IsLabeledStatement github.com/microsoft/typescript-go/internal/ast.IsLabeledStatement +func IsLabeledStatement(node *ast.Node) bool +//go:linkname IsLateVisibilityPaintedStatement github.com/microsoft/typescript-go/internal/ast.IsLateVisibilityPaintedStatement +func IsLateVisibilityPaintedStatement(node *ast.Node) bool +//go:linkname IsLeftHandSideExpression github.com/microsoft/typescript-go/internal/ast.IsLeftHandSideExpression +func IsLeftHandSideExpression(node *ast.Node) bool +//go:linkname IsLet github.com/microsoft/typescript-go/internal/ast.IsLet +func IsLet(node *ast.Node) bool +//go:linkname IsLiteralComputedPropertyDeclarationName github.com/microsoft/typescript-go/internal/ast.IsLiteralComputedPropertyDeclarationName +func IsLiteralComputedPropertyDeclarationName(node *ast.Node) bool +//go:linkname IsLiteralExpression github.com/microsoft/typescript-go/internal/ast.IsLiteralExpression +func IsLiteralExpression(node *ast.Node) bool +//go:linkname IsLiteralImportTypeNode github.com/microsoft/typescript-go/internal/ast.IsLiteralImportTypeNode +func IsLiteralImportTypeNode(node *ast.Node) bool +//go:linkname IsLiteralKind github.com/microsoft/typescript-go/internal/ast.IsLiteralKind +func IsLiteralKind(kind ast.Kind) bool +//go:linkname IsLiteralLikeElementAccess github.com/microsoft/typescript-go/internal/ast.IsLiteralLikeElementAccess +func IsLiteralLikeElementAccess(node *ast.Node) bool +//go:linkname IsLiteralTypeNode github.com/microsoft/typescript-go/internal/ast.IsLiteralTypeNode +func IsLiteralTypeNode(node *ast.Node) bool +//go:linkname IsLocalsContainer github.com/microsoft/typescript-go/internal/ast.IsLocalsContainer +func IsLocalsContainer(node *ast.Node) bool +//go:linkname IsLogicalBinaryOperator github.com/microsoft/typescript-go/internal/ast.IsLogicalBinaryOperator +func IsLogicalBinaryOperator(token ast.Kind) bool +//go:linkname IsLogicalExpression github.com/microsoft/typescript-go/internal/ast.IsLogicalExpression +func IsLogicalExpression(node *ast.Node) bool +//go:linkname IsLogicalOrCoalescingAssignmentExpression github.com/microsoft/typescript-go/internal/ast.IsLogicalOrCoalescingAssignmentExpression +func IsLogicalOrCoalescingAssignmentExpression(expr *ast.Node) bool +//go:linkname IsLogicalOrCoalescingAssignmentOperator github.com/microsoft/typescript-go/internal/ast.IsLogicalOrCoalescingAssignmentOperator +func IsLogicalOrCoalescingAssignmentOperator(token ast.Kind) bool +//go:linkname IsLogicalOrCoalescingBinaryExpression github.com/microsoft/typescript-go/internal/ast.IsLogicalOrCoalescingBinaryExpression +func IsLogicalOrCoalescingBinaryExpression(expr *ast.Node) bool +//go:linkname IsLogicalOrCoalescingBinaryOperator github.com/microsoft/typescript-go/internal/ast.IsLogicalOrCoalescingBinaryOperator +func IsLogicalOrCoalescingBinaryOperator(token ast.Kind) bool +//go:linkname IsMappedTypeNode github.com/microsoft/typescript-go/internal/ast.IsMappedTypeNode +func IsMappedTypeNode(node *ast.Node) bool +//go:linkname IsMemberName github.com/microsoft/typescript-go/internal/ast.IsMemberName +func IsMemberName(node *ast.Node) bool +//go:linkname IsMetaProperty github.com/microsoft/typescript-go/internal/ast.IsMetaProperty +func IsMetaProperty(node *ast.Node) bool +//go:linkname IsMethodDeclaration github.com/microsoft/typescript-go/internal/ast.IsMethodDeclaration +func IsMethodDeclaration(node *ast.Node) bool +//go:linkname IsMethodOrAccessor github.com/microsoft/typescript-go/internal/ast.IsMethodOrAccessor +func IsMethodOrAccessor(node *ast.Node) bool +//go:linkname IsMethodSignatureDeclaration github.com/microsoft/typescript-go/internal/ast.IsMethodSignatureDeclaration +func IsMethodSignatureDeclaration(node *ast.Node) bool +//go:linkname IsMissingDeclaration github.com/microsoft/typescript-go/internal/ast.IsMissingDeclaration +func IsMissingDeclaration(node *ast.Node) bool +//go:linkname IsModifier github.com/microsoft/typescript-go/internal/ast.IsModifier +func IsModifier(node *ast.Node) bool +//go:linkname IsModifierKind github.com/microsoft/typescript-go/internal/ast.IsModifierKind +func IsModifierKind(token ast.Kind) bool +//go:linkname IsModifierLike github.com/microsoft/typescript-go/internal/ast.IsModifierLike +func IsModifierLike(node *ast.Node) bool +//go:linkname IsModuleAugmentationExternal github.com/microsoft/typescript-go/internal/ast.IsModuleAugmentationExternal +func IsModuleAugmentationExternal(node *ast.Node) bool +//go:linkname IsModuleBlock github.com/microsoft/typescript-go/internal/ast.IsModuleBlock +func IsModuleBlock(node *ast.Node) bool +//go:linkname IsModuleDeclaration github.com/microsoft/typescript-go/internal/ast.IsModuleDeclaration +func IsModuleDeclaration(node *ast.Node) bool +//go:linkname IsModuleExportsAccessExpression github.com/microsoft/typescript-go/internal/ast.IsModuleExportsAccessExpression +func IsModuleExportsAccessExpression(node *ast.Node) bool +//go:linkname IsModuleExportsQualifiedName github.com/microsoft/typescript-go/internal/ast.IsModuleExportsQualifiedName +func IsModuleExportsQualifiedName(node *ast.Node) bool +//go:linkname IsModuleIdentifier github.com/microsoft/typescript-go/internal/ast.IsModuleIdentifier +func IsModuleIdentifier(node *ast.Node) bool +//go:linkname IsModuleOrEnumDeclaration github.com/microsoft/typescript-go/internal/ast.IsModuleOrEnumDeclaration +func IsModuleOrEnumDeclaration(node *ast.Node) bool +//go:linkname IsModuleWithStringLiteralName github.com/microsoft/typescript-go/internal/ast.IsModuleWithStringLiteralName +func IsModuleWithStringLiteralName(node *ast.Node) bool +//go:linkname IsNamedExports github.com/microsoft/typescript-go/internal/ast.IsNamedExports +func IsNamedExports(node *ast.Node) bool +//go:linkname IsNamedImports github.com/microsoft/typescript-go/internal/ast.IsNamedImports +func IsNamedImports(node *ast.Node) bool +//go:linkname IsNamedTupleMember github.com/microsoft/typescript-go/internal/ast.IsNamedTupleMember +func IsNamedTupleMember(node *ast.Node) bool +//go:linkname IsNamespaceExport github.com/microsoft/typescript-go/internal/ast.IsNamespaceExport +func IsNamespaceExport(node *ast.Node) bool +//go:linkname IsNamespaceExportDeclaration github.com/microsoft/typescript-go/internal/ast.IsNamespaceExportDeclaration +func IsNamespaceExportDeclaration(node *ast.Node) bool +//go:linkname IsNamespaceImport github.com/microsoft/typescript-go/internal/ast.IsNamespaceImport +func IsNamespaceImport(node *ast.Node) bool +//go:linkname IsNewExpression github.com/microsoft/typescript-go/internal/ast.IsNewExpression +func IsNewExpression(node *ast.Node) bool +//go:linkname IsNewExpressionTarget github.com/microsoft/typescript-go/internal/ast.IsNewExpressionTarget +func IsNewExpressionTarget(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsNoSubstitutionTemplateLiteral github.com/microsoft/typescript-go/internal/ast.IsNoSubstitutionTemplateLiteral +func IsNoSubstitutionTemplateLiteral(node *ast.Node) bool +//go:linkname IsNodeDescendantOf github.com/microsoft/typescript-go/internal/ast.IsNodeDescendantOf +func IsNodeDescendantOf(node *ast.Node, ancestor *ast.Node) bool +//go:linkname IsNonContextualKeyword github.com/microsoft/typescript-go/internal/ast.IsNonContextualKeyword +func IsNonContextualKeyword(token ast.Kind) bool +//go:linkname IsNonLocalAlias github.com/microsoft/typescript-go/internal/ast.IsNonLocalAlias +func IsNonLocalAlias(symbol *ast.Symbol, excludes ast.SymbolFlags) bool +//go:linkname IsNonNullExpression github.com/microsoft/typescript-go/internal/ast.IsNonNullExpression +func IsNonNullExpression(node *ast.Node) bool +//go:linkname IsNonWhitespaceToken github.com/microsoft/typescript-go/internal/ast.IsNonWhitespaceToken +func IsNonWhitespaceToken(node *ast.Node) bool +//go:linkname IsNotEmittedStatement github.com/microsoft/typescript-go/internal/ast.IsNotEmittedStatement +func IsNotEmittedStatement(node *ast.Node) bool +//go:linkname IsNotEmittedTypeElement github.com/microsoft/typescript-go/internal/ast.IsNotEmittedTypeElement +func IsNotEmittedTypeElement(node *ast.Node) bool +//go:linkname IsNullishCoalesce github.com/microsoft/typescript-go/internal/ast.IsNullishCoalesce +func IsNullishCoalesce(node *ast.Node) bool +//go:linkname IsNumericLiteral github.com/microsoft/typescript-go/internal/ast.IsNumericLiteral +func IsNumericLiteral(node *ast.Node) bool +//go:linkname IsObjectBindingOrAssignmentElement github.com/microsoft/typescript-go/internal/ast.IsObjectBindingOrAssignmentElement +func IsObjectBindingOrAssignmentElement(node *ast.Node) bool +//go:linkname IsObjectBindingPattern github.com/microsoft/typescript-go/internal/ast.IsObjectBindingPattern +func IsObjectBindingPattern(node *ast.Node) bool +//go:linkname IsObjectLiteralElement github.com/microsoft/typescript-go/internal/ast.IsObjectLiteralElement +func IsObjectLiteralElement(node *ast.Node) bool +//go:linkname IsObjectLiteralExpression github.com/microsoft/typescript-go/internal/ast.IsObjectLiteralExpression +func IsObjectLiteralExpression(node *ast.Node) bool +//go:linkname IsObjectLiteralMethod github.com/microsoft/typescript-go/internal/ast.IsObjectLiteralMethod +func IsObjectLiteralMethod(node *ast.Node) bool +//go:linkname IsObjectLiteralOrClassExpressionMethodOrAccessor github.com/microsoft/typescript-go/internal/ast.IsObjectLiteralOrClassExpressionMethodOrAccessor +func IsObjectLiteralOrClassExpressionMethodOrAccessor(node *ast.Node) bool +//go:linkname IsObjectTypeDeclaration github.com/microsoft/typescript-go/internal/ast.IsObjectTypeDeclaration +func IsObjectTypeDeclaration(node *ast.Node) bool +//go:linkname IsOmittedExpression github.com/microsoft/typescript-go/internal/ast.IsOmittedExpression +func IsOmittedExpression(node *ast.Node) bool +//go:linkname IsOptionalChain github.com/microsoft/typescript-go/internal/ast.IsOptionalChain +func IsOptionalChain(node *ast.Node) bool +//go:linkname IsOptionalChainRoot github.com/microsoft/typescript-go/internal/ast.IsOptionalChainRoot +func IsOptionalChainRoot(node *ast.Expression) bool +//go:linkname IsOptionalTypeNode github.com/microsoft/typescript-go/internal/ast.IsOptionalTypeNode +func IsOptionalTypeNode(node *ast.Node) bool +//go:linkname IsOuterExpression github.com/microsoft/typescript-go/internal/ast.IsOuterExpression +func IsOuterExpression(node *ast.Expression, kinds ast.OuterExpressionKinds) bool +//go:linkname IsOutermostOptionalChain github.com/microsoft/typescript-go/internal/ast.IsOutermostOptionalChain +func IsOutermostOptionalChain(node *ast.Expression) bool +//go:linkname IsParameter github.com/microsoft/typescript-go/internal/ast.IsParameter +func IsParameter(node *ast.Node) bool +//go:linkname IsParameterLike github.com/microsoft/typescript-go/internal/ast.IsParameterLike +func IsParameterLike(node *ast.Node) bool +//go:linkname IsParameterPropertyDeclaration github.com/microsoft/typescript-go/internal/ast.IsParameterPropertyDeclaration +func IsParameterPropertyDeclaration(node *ast.Node, parent *ast.Node) bool +//go:linkname IsParameterPropertyModifier github.com/microsoft/typescript-go/internal/ast.IsParameterPropertyModifier +func IsParameterPropertyModifier(kind ast.Kind) bool +//go:linkname IsParenthesizedExpression github.com/microsoft/typescript-go/internal/ast.IsParenthesizedExpression +func IsParenthesizedExpression(node *ast.Node) bool +//go:linkname IsParenthesizedTypeNode github.com/microsoft/typescript-go/internal/ast.IsParenthesizedTypeNode +func IsParenthesizedTypeNode(node *ast.Node) bool +//go:linkname IsParseTreeNode github.com/microsoft/typescript-go/internal/ast.IsParseTreeNode +func IsParseTreeNode(node *ast.Node) bool +//go:linkname IsPartOfExclusivelyTypeOnlyImportOrExportDeclaration github.com/microsoft/typescript-go/internal/ast.IsPartOfExclusivelyTypeOnlyImportOrExportDeclaration +func IsPartOfExclusivelyTypeOnlyImportOrExportDeclaration(node *ast.Node) bool +//go:linkname IsPartOfParameterDeclaration github.com/microsoft/typescript-go/internal/ast.IsPartOfParameterDeclaration +func IsPartOfParameterDeclaration(node *ast.Node) bool +//go:linkname IsPartOfTypeNode github.com/microsoft/typescript-go/internal/ast.IsPartOfTypeNode +func IsPartOfTypeNode(node *ast.Node) bool +//go:linkname IsPartOfTypeOnlyImportOrExportDeclaration github.com/microsoft/typescript-go/internal/ast.IsPartOfTypeOnlyImportOrExportDeclaration +func IsPartOfTypeOnlyImportOrExportDeclaration(node *ast.Node) bool +//go:linkname IsPartOfTypeQuery github.com/microsoft/typescript-go/internal/ast.IsPartOfTypeQuery +func IsPartOfTypeQuery(node *ast.Node) bool +//go:linkname IsPartiallyEmittedExpression github.com/microsoft/typescript-go/internal/ast.IsPartiallyEmittedExpression +func IsPartiallyEmittedExpression(node *ast.Node) bool +//go:linkname IsPlainJSFile github.com/microsoft/typescript-go/internal/ast.IsPlainJSFile +func IsPlainJSFile(file *ast.SourceFile, checkJs core.Tristate) bool +//go:linkname IsPostfixUnaryExpression github.com/microsoft/typescript-go/internal/ast.IsPostfixUnaryExpression +func IsPostfixUnaryExpression(node *ast.Node) bool +//go:linkname IsPotentiallyExecutableNode github.com/microsoft/typescript-go/internal/ast.IsPotentiallyExecutableNode +func IsPotentiallyExecutableNode(node *ast.Node) bool +//go:linkname IsPrefixUnaryExpression github.com/microsoft/typescript-go/internal/ast.IsPrefixUnaryExpression +func IsPrefixUnaryExpression(node *ast.Node) bool +//go:linkname IsPrimitiveLiteralValue github.com/microsoft/typescript-go/internal/ast.IsPrimitiveLiteralValue +func IsPrimitiveLiteralValue(node *ast.Node, includeBigInt bool) bool +//go:linkname IsPrivateIdentifier github.com/microsoft/typescript-go/internal/ast.IsPrivateIdentifier +func IsPrivateIdentifier(node *ast.Node) bool +//go:linkname IsPrivateIdentifierClassElementDeclaration github.com/microsoft/typescript-go/internal/ast.IsPrivateIdentifierClassElementDeclaration +func IsPrivateIdentifierClassElementDeclaration(node *ast.Node) bool +//go:linkname IsPrologueDirective github.com/microsoft/typescript-go/internal/ast.IsPrologueDirective +func IsPrologueDirective(node *ast.Node) bool +//go:linkname IsPropertyAccessEntityNameExpression github.com/microsoft/typescript-go/internal/ast.IsPropertyAccessEntityNameExpression +func IsPropertyAccessEntityNameExpression(node *ast.Node, allowJS bool) bool +//go:linkname IsPropertyAccessExpression github.com/microsoft/typescript-go/internal/ast.IsPropertyAccessExpression +func IsPropertyAccessExpression(node *ast.Node) bool +//go:linkname IsPropertyAccessOrQualifiedName github.com/microsoft/typescript-go/internal/ast.IsPropertyAccessOrQualifiedName +func IsPropertyAccessOrQualifiedName(node *ast.Node) bool +//go:linkname IsPropertyAssignment github.com/microsoft/typescript-go/internal/ast.IsPropertyAssignment +func IsPropertyAssignment(node *ast.Node) bool +//go:linkname IsPropertyDeclaration github.com/microsoft/typescript-go/internal/ast.IsPropertyDeclaration +func IsPropertyDeclaration(node *ast.Node) bool +//go:linkname IsPropertyName github.com/microsoft/typescript-go/internal/ast.IsPropertyName +func IsPropertyName(node *ast.Node) bool +//go:linkname IsPropertyNameLiteral github.com/microsoft/typescript-go/internal/ast.IsPropertyNameLiteral +func IsPropertyNameLiteral(node *ast.Node) bool +//go:linkname IsPropertySignatureDeclaration github.com/microsoft/typescript-go/internal/ast.IsPropertySignatureDeclaration +func IsPropertySignatureDeclaration(node *ast.Node) bool +//go:linkname IsPrototypeAccess github.com/microsoft/typescript-go/internal/ast.IsPrototypeAccess +func IsPrototypeAccess(node *ast.Node) bool +//go:linkname IsPunctuationKind github.com/microsoft/typescript-go/internal/ast.IsPunctuationKind +func IsPunctuationKind(token ast.Kind) bool +//go:linkname IsPushOrUnshiftIdentifier github.com/microsoft/typescript-go/internal/ast.IsPushOrUnshiftIdentifier +func IsPushOrUnshiftIdentifier(node *ast.Node) bool +//go:linkname IsQualifiedName github.com/microsoft/typescript-go/internal/ast.IsQualifiedName +func IsQualifiedName(node *ast.Node) bool +//go:linkname IsQuestionToken github.com/microsoft/typescript-go/internal/ast.IsQuestionToken +func IsQuestionToken(node *ast.Node) bool +//go:linkname IsRegularExpressionLiteral github.com/microsoft/typescript-go/internal/ast.IsRegularExpressionLiteral +func IsRegularExpressionLiteral(node *ast.Node) bool +//go:linkname IsRequireCall github.com/microsoft/typescript-go/internal/ast.IsRequireCall +func IsRequireCall(node *ast.Node, requireStringLiteralLikeArgument bool) bool +//go:linkname IsRequireVariableStatement github.com/microsoft/typescript-go/internal/ast.IsRequireVariableStatement +func IsRequireVariableStatement(node *ast.Node) bool +//go:linkname IsResolutionModeOverrideHost github.com/microsoft/typescript-go/internal/ast.IsResolutionModeOverrideHost +func IsResolutionModeOverrideHost(node *ast.Node) bool +//go:linkname IsRestTypeNode github.com/microsoft/typescript-go/internal/ast.IsRestTypeNode +func IsRestTypeNode(node *ast.Node) bool +//go:linkname IsReturnStatement github.com/microsoft/typescript-go/internal/ast.IsReturnStatement +func IsReturnStatement(node *ast.Node) bool +//go:linkname IsRightSideOfPropertyAccess github.com/microsoft/typescript-go/internal/ast.IsRightSideOfPropertyAccess +func IsRightSideOfPropertyAccess(node *ast.Node) bool +//go:linkname IsRightSideOfQualifiedNameOrPropertyAccess github.com/microsoft/typescript-go/internal/ast.IsRightSideOfQualifiedNameOrPropertyAccess +func IsRightSideOfQualifiedNameOrPropertyAccess(node *ast.Node) bool +//go:linkname IsSatisfiesExpression github.com/microsoft/typescript-go/internal/ast.IsSatisfiesExpression +func IsSatisfiesExpression(node *ast.Node) bool +//go:linkname IsSemicolonClassElement github.com/microsoft/typescript-go/internal/ast.IsSemicolonClassElement +func IsSemicolonClassElement(node *ast.Node) bool +//go:linkname IsSetAccessorDeclaration github.com/microsoft/typescript-go/internal/ast.IsSetAccessorDeclaration +func IsSetAccessorDeclaration(node *ast.Node) bool +//go:linkname IsShorthandPropertyAssignment github.com/microsoft/typescript-go/internal/ast.IsShorthandPropertyAssignment +func IsShorthandPropertyAssignment(node *ast.Node) bool +//go:linkname IsSignedNumericLiteral github.com/microsoft/typescript-go/internal/ast.IsSignedNumericLiteral +func IsSignedNumericLiteral(node *ast.Node) bool +//go:linkname IsSourceFile github.com/microsoft/typescript-go/internal/ast.IsSourceFile +func IsSourceFile(node *ast.Node) bool +//go:linkname IsSourceFileJS github.com/microsoft/typescript-go/internal/ast.IsSourceFileJS +func IsSourceFileJS(file *ast.SourceFile) bool +//go:linkname IsSpreadAssignment github.com/microsoft/typescript-go/internal/ast.IsSpreadAssignment +func IsSpreadAssignment(node *ast.Node) bool +//go:linkname IsSpreadElement github.com/microsoft/typescript-go/internal/ast.IsSpreadElement +func IsSpreadElement(node *ast.Node) bool +//go:linkname IsStatement github.com/microsoft/typescript-go/internal/ast.IsStatement +func IsStatement(node *ast.Node) bool +//go:linkname IsStatementButNotDeclaration github.com/microsoft/typescript-go/internal/ast.IsStatementButNotDeclaration +func IsStatementButNotDeclaration(node *ast.Node) bool +//go:linkname IsStatic github.com/microsoft/typescript-go/internal/ast.IsStatic +func IsStatic(node *ast.Node) bool +//go:linkname IsStringLiteral github.com/microsoft/typescript-go/internal/ast.IsStringLiteral +func IsStringLiteral(node *ast.Node) bool +//go:linkname IsStringLiteralLike github.com/microsoft/typescript-go/internal/ast.IsStringLiteralLike +func IsStringLiteralLike(node *ast.Node) bool +//go:linkname IsStringOrNumericLiteralLike github.com/microsoft/typescript-go/internal/ast.IsStringOrNumericLiteralLike +func IsStringOrNumericLiteralLike(node *ast.Node) bool +//go:linkname IsStringTextContainingNode github.com/microsoft/typescript-go/internal/ast.IsStringTextContainingNode +func IsStringTextContainingNode(node *ast.Node) bool +//go:linkname IsSuperCall github.com/microsoft/typescript-go/internal/ast.IsSuperCall +func IsSuperCall(node *ast.Node) bool +//go:linkname IsSuperProperty github.com/microsoft/typescript-go/internal/ast.IsSuperProperty +func IsSuperProperty(node *ast.Node) bool +//go:linkname IsSwitchStatement github.com/microsoft/typescript-go/internal/ast.IsSwitchStatement +func IsSwitchStatement(node *ast.Node) bool +//go:linkname IsSyntaxList github.com/microsoft/typescript-go/internal/ast.IsSyntaxList +func IsSyntaxList(node *ast.Node) bool +//go:linkname IsSyntheticExpression github.com/microsoft/typescript-go/internal/ast.IsSyntheticExpression +func IsSyntheticExpression(node *ast.Node) bool +//go:linkname IsSyntheticReferenceExpression github.com/microsoft/typescript-go/internal/ast.IsSyntheticReferenceExpression +func IsSyntheticReferenceExpression(node *ast.Node) bool +//go:linkname IsTagName github.com/microsoft/typescript-go/internal/ast.IsTagName +func IsTagName(node *ast.Node) bool +//go:linkname IsTaggedTemplateExpression github.com/microsoft/typescript-go/internal/ast.IsTaggedTemplateExpression +func IsTaggedTemplateExpression(node *ast.Node) bool +//go:linkname IsTaggedTemplateTag github.com/microsoft/typescript-go/internal/ast.IsTaggedTemplateTag +func IsTaggedTemplateTag(node *ast.Node, includeElementAccess bool, skipPastOuterExpressions bool) bool +//go:linkname IsTemplateExpression github.com/microsoft/typescript-go/internal/ast.IsTemplateExpression +func IsTemplateExpression(node *ast.Node) bool +//go:linkname IsTemplateHead github.com/microsoft/typescript-go/internal/ast.IsTemplateHead +func IsTemplateHead(node *ast.Node) bool +//go:linkname IsTemplateLiteralKind github.com/microsoft/typescript-go/internal/ast.IsTemplateLiteralKind +func IsTemplateLiteralKind(kind ast.Kind) bool +//go:linkname IsTemplateLiteralToken github.com/microsoft/typescript-go/internal/ast.IsTemplateLiteralToken +func IsTemplateLiteralToken(node *ast.Node) bool +//go:linkname IsTemplateLiteralTypeNode github.com/microsoft/typescript-go/internal/ast.IsTemplateLiteralTypeNode +func IsTemplateLiteralTypeNode(node *ast.Node) bool +//go:linkname IsTemplateLiteralTypeSpan github.com/microsoft/typescript-go/internal/ast.IsTemplateLiteralTypeSpan +func IsTemplateLiteralTypeSpan(node *ast.Node) bool +//go:linkname IsTemplateMiddle github.com/microsoft/typescript-go/internal/ast.IsTemplateMiddle +func IsTemplateMiddle(node *ast.Node) bool +//go:linkname IsTemplateSpan github.com/microsoft/typescript-go/internal/ast.IsTemplateSpan +func IsTemplateSpan(node *ast.Node) bool +//go:linkname IsTemplateTail github.com/microsoft/typescript-go/internal/ast.IsTemplateTail +func IsTemplateTail(node *ast.Node) bool +//go:linkname IsThisIdentifier github.com/microsoft/typescript-go/internal/ast.IsThisIdentifier +func IsThisIdentifier(node *ast.Node) bool +//go:linkname IsThisInTypeQuery github.com/microsoft/typescript-go/internal/ast.IsThisInTypeQuery +func IsThisInTypeQuery(node *ast.Node) bool +//go:linkname IsThisParameter github.com/microsoft/typescript-go/internal/ast.IsThisParameter +func IsThisParameter(node *ast.Node) bool +//go:linkname IsThisTypeNode github.com/microsoft/typescript-go/internal/ast.IsThisTypeNode +func IsThisTypeNode(node *ast.Node) bool +//go:linkname IsThrowStatement github.com/microsoft/typescript-go/internal/ast.IsThrowStatement +func IsThrowStatement(node *ast.Node) bool +//go:linkname IsTokenKind github.com/microsoft/typescript-go/internal/ast.IsTokenKind +func IsTokenKind(token ast.Kind) bool +//go:linkname IsTrivia github.com/microsoft/typescript-go/internal/ast.IsTrivia +func IsTrivia(token ast.Kind) bool +//go:linkname IsTryStatement github.com/microsoft/typescript-go/internal/ast.IsTryStatement +func IsTryStatement(node *ast.Node) bool +//go:linkname IsTupleTypeNode github.com/microsoft/typescript-go/internal/ast.IsTupleTypeNode +func IsTupleTypeNode(node *ast.Node) bool +//go:linkname IsTypeAliasDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeAliasDeclaration +func IsTypeAliasDeclaration(node *ast.Node) bool +//go:linkname IsTypeAssertionExpression github.com/microsoft/typescript-go/internal/ast.IsTypeAssertionExpression +func IsTypeAssertionExpression(node *ast.Node) bool +//go:linkname IsTypeDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeDeclaration +func IsTypeDeclaration(node *ast.Node) bool +//go:linkname IsTypeDeclarationName github.com/microsoft/typescript-go/internal/ast.IsTypeDeclarationName +func IsTypeDeclarationName(name *ast.Node) bool +//go:linkname IsTypeElement github.com/microsoft/typescript-go/internal/ast.IsTypeElement +func IsTypeElement(node *ast.Node) bool +//go:linkname IsTypeKeywordToken github.com/microsoft/typescript-go/internal/ast.IsTypeKeywordToken +func IsTypeKeywordToken(node *ast.Node) bool +//go:linkname IsTypeLiteralNode github.com/microsoft/typescript-go/internal/ast.IsTypeLiteralNode +func IsTypeLiteralNode(node *ast.Node) bool +//go:linkname IsTypeNode github.com/microsoft/typescript-go/internal/ast.IsTypeNode +func IsTypeNode(node *ast.Node) bool +//go:linkname IsTypeNodeKind github.com/microsoft/typescript-go/internal/ast.IsTypeNodeKind +func IsTypeNodeKind(kind ast.Kind) bool +//go:linkname IsTypeOfExpression github.com/microsoft/typescript-go/internal/ast.IsTypeOfExpression +func IsTypeOfExpression(node *ast.Node) bool +//go:linkname IsTypeOnlyImportDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeOnlyImportDeclaration +func IsTypeOnlyImportDeclaration(node *ast.Node) bool +//go:linkname IsTypeOnlyImportOrExportDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeOnlyImportOrExportDeclaration +func IsTypeOnlyImportOrExportDeclaration(node *ast.Node) bool +//go:linkname IsTypeOperatorNode github.com/microsoft/typescript-go/internal/ast.IsTypeOperatorNode +func IsTypeOperatorNode(node *ast.Node) bool +//go:linkname IsTypeOrJSTypeAliasDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeOrJSTypeAliasDeclaration +func IsTypeOrJSTypeAliasDeclaration(node *ast.Node) bool +//go:linkname IsTypeParameterDeclaration github.com/microsoft/typescript-go/internal/ast.IsTypeParameterDeclaration +func IsTypeParameterDeclaration(node *ast.Node) bool +//go:linkname IsTypePredicateNode github.com/microsoft/typescript-go/internal/ast.IsTypePredicateNode +func IsTypePredicateNode(node *ast.Node) bool +//go:linkname IsTypeQueryNode github.com/microsoft/typescript-go/internal/ast.IsTypeQueryNode +func IsTypeQueryNode(node *ast.Node) bool +//go:linkname IsTypeReferenceNode github.com/microsoft/typescript-go/internal/ast.IsTypeReferenceNode +func IsTypeReferenceNode(node *ast.Node) bool +//go:linkname IsTypeReferenceType github.com/microsoft/typescript-go/internal/ast.IsTypeReferenceType +func IsTypeReferenceType(node *ast.Node) bool +//go:linkname IsUnaryExpression github.com/microsoft/typescript-go/internal/ast.IsUnaryExpression +func IsUnaryExpression(node *ast.Node) bool +//go:linkname IsUnionTypeNode github.com/microsoft/typescript-go/internal/ast.IsUnionTypeNode +func IsUnionTypeNode(node *ast.Node) bool +//go:linkname IsUnterminatedLiteral github.com/microsoft/typescript-go/internal/ast.IsUnterminatedLiteral +func IsUnterminatedLiteral(node *ast.Node) bool +//go:linkname IsValidTypeOnlyAliasUseSite github.com/microsoft/typescript-go/internal/ast.IsValidTypeOnlyAliasUseSite +func IsValidTypeOnlyAliasUseSite(useSite *ast.Node) bool +//go:linkname IsVarAwaitUsing github.com/microsoft/typescript-go/internal/ast.IsVarAwaitUsing +func IsVarAwaitUsing(node *ast.Node) bool +//go:linkname IsVarConst github.com/microsoft/typescript-go/internal/ast.IsVarConst +func IsVarConst(node *ast.Node) bool +//go:linkname IsVarConstLike github.com/microsoft/typescript-go/internal/ast.IsVarConstLike +func IsVarConstLike(node *ast.Node) bool +//go:linkname IsVarLet github.com/microsoft/typescript-go/internal/ast.IsVarLet +func IsVarLet(node *ast.Node) bool +//go:linkname IsVarUsing github.com/microsoft/typescript-go/internal/ast.IsVarUsing +func IsVarUsing(node *ast.Node) bool +//go:linkname IsVariableDeclaration github.com/microsoft/typescript-go/internal/ast.IsVariableDeclaration +func IsVariableDeclaration(node *ast.Node) bool +//go:linkname IsVariableDeclarationInitializedToBareOrAccessedRequire github.com/microsoft/typescript-go/internal/ast.IsVariableDeclarationInitializedToBareOrAccessedRequire +func IsVariableDeclarationInitializedToBareOrAccessedRequire(node *ast.Node) bool +//go:linkname IsVariableDeclarationInitializedToRequire github.com/microsoft/typescript-go/internal/ast.IsVariableDeclarationInitializedToRequire +func IsVariableDeclarationInitializedToRequire(node *ast.Node) bool +//go:linkname IsVariableDeclarationList github.com/microsoft/typescript-go/internal/ast.IsVariableDeclarationList +func IsVariableDeclarationList(node *ast.Node) bool +//go:linkname IsVariableLike github.com/microsoft/typescript-go/internal/ast.IsVariableLike +func IsVariableLike(node *ast.Node) bool +//go:linkname IsVariableParameterOrProperty github.com/microsoft/typescript-go/internal/ast.IsVariableParameterOrProperty +func IsVariableParameterOrProperty(node *ast.Node) bool +//go:linkname IsVariableStatement github.com/microsoft/typescript-go/internal/ast.IsVariableStatement +func IsVariableStatement(node *ast.Node) bool +//go:linkname IsVoidExpression github.com/microsoft/typescript-go/internal/ast.IsVoidExpression +func IsVoidExpression(node *ast.Node) bool +//go:linkname IsVoidZero github.com/microsoft/typescript-go/internal/ast.IsVoidZero +func IsVoidZero(node *ast.Node) bool +//go:linkname IsWhileStatement github.com/microsoft/typescript-go/internal/ast.IsWhileStatement +func IsWhileStatement(node *ast.Node) bool +//go:linkname IsWhitespaceOnlyJsxText github.com/microsoft/typescript-go/internal/ast.IsWhitespaceOnlyJsxText +func IsWhitespaceOnlyJsxText(node *ast.Node) bool +//go:linkname IsWithStatement github.com/microsoft/typescript-go/internal/ast.IsWithStatement +func IsWithStatement(node *ast.Node) bool +//go:linkname IsWriteAccess github.com/microsoft/typescript-go/internal/ast.IsWriteAccess +func IsWriteAccess(node *ast.Node) bool +//go:linkname IsWriteAccessForReference github.com/microsoft/typescript-go/internal/ast.IsWriteAccessForReference +func IsWriteAccessForReference(node *ast.Node) bool +//go:linkname IsWriteOnlyAccess github.com/microsoft/typescript-go/internal/ast.IsWriteOnlyAccess +func IsWriteOnlyAccess(node *ast.Node) bool +//go:linkname IsYieldExpression github.com/microsoft/typescript-go/internal/ast.IsYieldExpression +func IsYieldExpression(node *ast.Node) bool +type JSDeclarationKind = ast.JSDeclarationKind +const JSDeclarationKindExportsProperty = ast.JSDeclarationKindExportsProperty +const JSDeclarationKindModuleExports = ast.JSDeclarationKindModuleExports +const JSDeclarationKindNone = ast.JSDeclarationKindNone +const JSDeclarationKindObjectDefinePropertyExports = ast.JSDeclarationKindObjectDefinePropertyExports +const JSDeclarationKindObjectDefinePropertyValue = ast.JSDeclarationKindObjectDefinePropertyValue +const JSDeclarationKindProperty = ast.JSDeclarationKindProperty +const JSDeclarationKindThisProperty = ast.JSDeclarationKindThisProperty +type JSDoc = ast.JSDoc +type JSDocAllType = ast.JSDocAllType +type JSDocAugmentsTag = ast.JSDocAugmentsTag +type JSDocCallbackTag = ast.JSDocCallbackTag +type JSDocComment = ast.JSDocComment +type JSDocCommentBase = ast.JSDocCommentBase +type JSDocDeprecatedTag = ast.JSDocDeprecatedTag +type JSDocImplementsTag = ast.JSDocImplementsTag +type JSDocImportTag = ast.JSDocImportTag +type JSDocLink = ast.JSDocLink +type JSDocLinkCode = ast.JSDocLinkCode +type JSDocLinkPlain = ast.JSDocLinkPlain +type JSDocNameReference = ast.JSDocNameReference +type JSDocNode = ast.JSDocNode +type JSDocNonNullableType = ast.JSDocNonNullableType +type JSDocNullableType = ast.JSDocNullableType +type JSDocOptionalType = ast.JSDocOptionalType +type JSDocOverloadTag = ast.JSDocOverloadTag +type JSDocOverrideTag = ast.JSDocOverrideTag +type JSDocParameterOrPropertyTag = ast.JSDocParameterOrPropertyTag +type JSDocParameterTag = ast.JSDocParameterTag +type JSDocPrivateTag = ast.JSDocPrivateTag +type JSDocPropertyTag = ast.JSDocPropertyTag +type JSDocProtectedTag = ast.JSDocProtectedTag +type JSDocPublicTag = ast.JSDocPublicTag +type JSDocReadonlyTag = ast.JSDocReadonlyTag +type JSDocReturnTag = ast.JSDocReturnTag +type JSDocSatisfiesTag = ast.JSDocSatisfiesTag +type JSDocSeeTag = ast.JSDocSeeTag +type JSDocSignature = ast.JSDocSignature +type JSDocTag = ast.JSDocTag +type JSDocTagBase = ast.JSDocTagBase +type JSDocTemplateTag = ast.JSDocTemplateTag +type JSDocText = ast.JSDocText +type JSDocThisTag = ast.JSDocThisTag +type JSDocThrowsTag = ast.JSDocThrowsTag +type JSDocTypeExpression = ast.JSDocTypeExpression +type JSDocTypeLiteral = ast.JSDocTypeLiteral +type JSDocTypeTag = ast.JSDocTypeTag +type JSDocTypedefTag = ast.JSDocTypedefTag +type JSDocUnknownTag = ast.JSDocUnknownTag +type JSDocVariadicType = ast.JSDocVariadicType +type JsxAttribute = ast.JsxAttribute +type JsxAttributeLike = ast.JsxAttributeLike +type JsxAttributeList = ast.JsxAttributeList +type JsxAttributeName = ast.JsxAttributeName +type JsxAttributeValue = ast.JsxAttributeValue +type JsxAttributes = ast.JsxAttributes +type JsxAttributesNode = ast.JsxAttributesNode +type JsxChild = ast.JsxChild +type JsxChildList = ast.JsxChildList +type JsxClosingElement = ast.JsxClosingElement +type JsxClosingElementNode = ast.JsxClosingElementNode +type JsxClosingFragment = ast.JsxClosingFragment +type JsxClosingFragmentNode = ast.JsxClosingFragmentNode +type JsxElement = ast.JsxElement +type JsxExpression = ast.JsxExpression +type JsxFragment = ast.JsxFragment +type JsxNamespacedName = ast.JsxNamespacedName +type JsxOpeningElement = ast.JsxOpeningElement +type JsxOpeningElementNode = ast.JsxOpeningElementNode +type JsxOpeningFragment = ast.JsxOpeningFragment +type JsxOpeningFragmentNode = ast.JsxOpeningFragmentNode +type JsxOpeningLikeElement = ast.JsxOpeningLikeElement +type JsxSelfClosingElement = ast.JsxSelfClosingElement +type JsxSpreadAttribute = ast.JsxSpreadAttribute +type JsxTagNameExpression = ast.JsxTagNameExpression +type JsxText = ast.JsxText +type KeywordExpression = ast.KeywordExpression +type KeywordTypeNode = ast.KeywordTypeNode +type Kind = ast.Kind +const KindAbstractKeyword = ast.KindAbstractKeyword +const KindAccessorKeyword = ast.KindAccessorKeyword +const KindAmpersandAmpersandEqualsToken = ast.KindAmpersandAmpersandEqualsToken +const KindAmpersandAmpersandToken = ast.KindAmpersandAmpersandToken +const KindAmpersandEqualsToken = ast.KindAmpersandEqualsToken +const KindAmpersandToken = ast.KindAmpersandToken +const KindAnyKeyword = ast.KindAnyKeyword +const KindArrayBindingPattern = ast.KindArrayBindingPattern +const KindArrayLiteralExpression = ast.KindArrayLiteralExpression +const KindArrayType = ast.KindArrayType +const KindArrowFunction = ast.KindArrowFunction +const KindAsExpression = ast.KindAsExpression +const KindAsKeyword = ast.KindAsKeyword +const KindAssertKeyword = ast.KindAssertKeyword +const KindAssertsKeyword = ast.KindAssertsKeyword +const KindAsteriskAsteriskEqualsToken = ast.KindAsteriskAsteriskEqualsToken +const KindAsteriskAsteriskToken = ast.KindAsteriskAsteriskToken +const KindAsteriskEqualsToken = ast.KindAsteriskEqualsToken +const KindAsteriskToken = ast.KindAsteriskToken +const KindAsyncKeyword = ast.KindAsyncKeyword +const KindAtToken = ast.KindAtToken +const KindAwaitExpression = ast.KindAwaitExpression +const KindAwaitKeyword = ast.KindAwaitKeyword +const KindBacktickToken = ast.KindBacktickToken +const KindBarBarEqualsToken = ast.KindBarBarEqualsToken +const KindBarBarToken = ast.KindBarBarToken +const KindBarEqualsToken = ast.KindBarEqualsToken +const KindBarToken = ast.KindBarToken +const KindBigIntKeyword = ast.KindBigIntKeyword +const KindBigIntLiteral = ast.KindBigIntLiteral +const KindBinaryExpression = ast.KindBinaryExpression +const KindBindingElement = ast.KindBindingElement +const KindBlock = ast.KindBlock +const KindBooleanKeyword = ast.KindBooleanKeyword +const KindBreakKeyword = ast.KindBreakKeyword +const KindBreakStatement = ast.KindBreakStatement +const KindCallExpression = ast.KindCallExpression +const KindCallSignature = ast.KindCallSignature +const KindCaretEqualsToken = ast.KindCaretEqualsToken +const KindCaretToken = ast.KindCaretToken +const KindCaseBlock = ast.KindCaseBlock +const KindCaseClause = ast.KindCaseClause +const KindCaseKeyword = ast.KindCaseKeyword +const KindCatchClause = ast.KindCatchClause +const KindCatchKeyword = ast.KindCatchKeyword +const KindClassDeclaration = ast.KindClassDeclaration +const KindClassExpression = ast.KindClassExpression +const KindClassKeyword = ast.KindClassKeyword +const KindClassStaticBlockDeclaration = ast.KindClassStaticBlockDeclaration +const KindCloseBraceToken = ast.KindCloseBraceToken +const KindCloseBracketToken = ast.KindCloseBracketToken +const KindCloseParenToken = ast.KindCloseParenToken +const KindColonToken = ast.KindColonToken +const KindCommaListExpression = ast.KindCommaListExpression +const KindCommaToken = ast.KindCommaToken +const KindComment = ast.KindComment +const KindCommonJSExport = ast.KindCommonJSExport +const KindComputedPropertyName = ast.KindComputedPropertyName +const KindConditionalExpression = ast.KindConditionalExpression +const KindConditionalType = ast.KindConditionalType +const KindConflictMarkerTrivia = ast.KindConflictMarkerTrivia +const KindConstKeyword = ast.KindConstKeyword +const KindConstructSignature = ast.KindConstructSignature +const KindConstructor = ast.KindConstructor +const KindConstructorKeyword = ast.KindConstructorKeyword +const KindConstructorType = ast.KindConstructorType +const KindContinueKeyword = ast.KindContinueKeyword +const KindContinueStatement = ast.KindContinueStatement +const KindCount = ast.KindCount +const KindDebuggerKeyword = ast.KindDebuggerKeyword +const KindDebuggerStatement = ast.KindDebuggerStatement +const KindDeclareKeyword = ast.KindDeclareKeyword +const KindDecorator = ast.KindDecorator +const KindDefaultClause = ast.KindDefaultClause +const KindDefaultKeyword = ast.KindDefaultKeyword +const KindDeferKeyword = ast.KindDeferKeyword +const KindDeleteExpression = ast.KindDeleteExpression +const KindDeleteKeyword = ast.KindDeleteKeyword +const KindDoKeyword = ast.KindDoKeyword +const KindDoStatement = ast.KindDoStatement +const KindDotDotDotToken = ast.KindDotDotDotToken +const KindDotToken = ast.KindDotToken +const KindElementAccessExpression = ast.KindElementAccessExpression +const KindElseKeyword = ast.KindElseKeyword +const KindEmptyStatement = ast.KindEmptyStatement +const KindEndOfFile = ast.KindEndOfFile +const KindEnumDeclaration = ast.KindEnumDeclaration +const KindEnumKeyword = ast.KindEnumKeyword +const KindEnumMember = ast.KindEnumMember +const KindEqualsEqualsEqualsToken = ast.KindEqualsEqualsEqualsToken +const KindEqualsEqualsToken = ast.KindEqualsEqualsToken +const KindEqualsGreaterThanToken = ast.KindEqualsGreaterThanToken +const KindEqualsToken = ast.KindEqualsToken +const KindExclamationEqualsEqualsToken = ast.KindExclamationEqualsEqualsToken +const KindExclamationEqualsToken = ast.KindExclamationEqualsToken +const KindExclamationToken = ast.KindExclamationToken +const KindExportAssignment = ast.KindExportAssignment +const KindExportDeclaration = ast.KindExportDeclaration +const KindExportKeyword = ast.KindExportKeyword +const KindExportSpecifier = ast.KindExportSpecifier +const KindExpressionStatement = ast.KindExpressionStatement +const KindExpressionWithTypeArguments = ast.KindExpressionWithTypeArguments +const KindExtendsKeyword = ast.KindExtendsKeyword +const KindExternalModuleReference = ast.KindExternalModuleReference +const KindFalseKeyword = ast.KindFalseKeyword +const KindFinallyKeyword = ast.KindFinallyKeyword +const KindFirstAssignment = ast.KindFirstAssignment +const KindFirstBinaryOperator = ast.KindFirstBinaryOperator +const KindFirstCompoundAssignment = ast.KindFirstCompoundAssignment +const KindFirstContextualKeyword = ast.KindFirstContextualKeyword +const KindFirstFutureReservedWord = ast.KindFirstFutureReservedWord +const KindFirstJSDocNode = ast.KindFirstJSDocNode +const KindFirstJSDocTagNode = ast.KindFirstJSDocTagNode +const KindFirstKeyword = ast.KindFirstKeyword +const KindFirstLiteralToken = ast.KindFirstLiteralToken +const KindFirstNode = ast.KindFirstNode +const KindFirstPunctuation = ast.KindFirstPunctuation +const KindFirstReservedWord = ast.KindFirstReservedWord +const KindFirstStatement = ast.KindFirstStatement +const KindFirstTemplateToken = ast.KindFirstTemplateToken +const KindFirstToken = ast.KindFirstToken +const KindFirstTriviaToken = ast.KindFirstTriviaToken +const KindFirstTypeNode = ast.KindFirstTypeNode +const KindForInStatement = ast.KindForInStatement +const KindForKeyword = ast.KindForKeyword +const KindForOfStatement = ast.KindForOfStatement +const KindForStatement = ast.KindForStatement +const KindFromKeyword = ast.KindFromKeyword +const KindFunctionDeclaration = ast.KindFunctionDeclaration +const KindFunctionExpression = ast.KindFunctionExpression +const KindFunctionKeyword = ast.KindFunctionKeyword +const KindFunctionType = ast.KindFunctionType +const KindGetAccessor = ast.KindGetAccessor +const KindGetKeyword = ast.KindGetKeyword +const KindGlobalKeyword = ast.KindGlobalKeyword +const KindGreaterThanEqualsToken = ast.KindGreaterThanEqualsToken +const KindGreaterThanGreaterThanEqualsToken = ast.KindGreaterThanGreaterThanEqualsToken +const KindGreaterThanGreaterThanGreaterThanEqualsToken = ast.KindGreaterThanGreaterThanGreaterThanEqualsToken +const KindGreaterThanGreaterThanGreaterThanToken = ast.KindGreaterThanGreaterThanGreaterThanToken +const KindGreaterThanGreaterThanToken = ast.KindGreaterThanGreaterThanToken +const KindGreaterThanToken = ast.KindGreaterThanToken +const KindHashToken = ast.KindHashToken +const KindHeritageClause = ast.KindHeritageClause +const KindIdentifier = ast.KindIdentifier +const KindIfKeyword = ast.KindIfKeyword +const KindIfStatement = ast.KindIfStatement +const KindImmediateKeyword = ast.KindImmediateKeyword +const KindImplementsKeyword = ast.KindImplementsKeyword +const KindImportAttribute = ast.KindImportAttribute +const KindImportAttributes = ast.KindImportAttributes +const KindImportClause = ast.KindImportClause +const KindImportDeclaration = ast.KindImportDeclaration +const KindImportEqualsDeclaration = ast.KindImportEqualsDeclaration +const KindImportKeyword = ast.KindImportKeyword +const KindImportSpecifier = ast.KindImportSpecifier +const KindImportType = ast.KindImportType +const KindInKeyword = ast.KindInKeyword +const KindIndexSignature = ast.KindIndexSignature +const KindIndexedAccessType = ast.KindIndexedAccessType +const KindInferKeyword = ast.KindInferKeyword +const KindInferType = ast.KindInferType +const KindInstanceOfKeyword = ast.KindInstanceOfKeyword +const KindInterfaceDeclaration = ast.KindInterfaceDeclaration +const KindInterfaceKeyword = ast.KindInterfaceKeyword +const KindIntersectionType = ast.KindIntersectionType +const KindIntrinsicKeyword = ast.KindIntrinsicKeyword +const KindIsKeyword = ast.KindIsKeyword +const KindJSDoc = ast.KindJSDoc +const KindJSDocAllType = ast.KindJSDocAllType +const KindJSDocAugmentsTag = ast.KindJSDocAugmentsTag +const KindJSDocCallbackTag = ast.KindJSDocCallbackTag +const KindJSDocCommentTextToken = ast.KindJSDocCommentTextToken +const KindJSDocDeprecatedTag = ast.KindJSDocDeprecatedTag +const KindJSDocImplementsTag = ast.KindJSDocImplementsTag +const KindJSDocImportTag = ast.KindJSDocImportTag +const KindJSDocLink = ast.KindJSDocLink +const KindJSDocLinkCode = ast.KindJSDocLinkCode +const KindJSDocLinkPlain = ast.KindJSDocLinkPlain +const KindJSDocMemberName = ast.KindJSDocMemberName +const KindJSDocNameReference = ast.KindJSDocNameReference +const KindJSDocNonNullableType = ast.KindJSDocNonNullableType +const KindJSDocNullableType = ast.KindJSDocNullableType +const KindJSDocOptionalType = ast.KindJSDocOptionalType +const KindJSDocOverloadTag = ast.KindJSDocOverloadTag +const KindJSDocOverrideTag = ast.KindJSDocOverrideTag +const KindJSDocParameterTag = ast.KindJSDocParameterTag +const KindJSDocPrivateTag = ast.KindJSDocPrivateTag +const KindJSDocPropertyTag = ast.KindJSDocPropertyTag +const KindJSDocProtectedTag = ast.KindJSDocProtectedTag +const KindJSDocPublicTag = ast.KindJSDocPublicTag +const KindJSDocReadonlyTag = ast.KindJSDocReadonlyTag +const KindJSDocReturnTag = ast.KindJSDocReturnTag +const KindJSDocSatisfiesTag = ast.KindJSDocSatisfiesTag +const KindJSDocSeeTag = ast.KindJSDocSeeTag +const KindJSDocSignature = ast.KindJSDocSignature +const KindJSDocTag = ast.KindJSDocTag +const KindJSDocTemplateTag = ast.KindJSDocTemplateTag +const KindJSDocText = ast.KindJSDocText +const KindJSDocThisTag = ast.KindJSDocThisTag +const KindJSDocThrowsTag = ast.KindJSDocThrowsTag +const KindJSDocTypeExpression = ast.KindJSDocTypeExpression +const KindJSDocTypeLiteral = ast.KindJSDocTypeLiteral +const KindJSDocTypeTag = ast.KindJSDocTypeTag +const KindJSDocTypedefTag = ast.KindJSDocTypedefTag +const KindJSDocVariadicType = ast.KindJSDocVariadicType +const KindJSExportAssignment = ast.KindJSExportAssignment +const KindJSImportDeclaration = ast.KindJSImportDeclaration +const KindJSTypeAliasDeclaration = ast.KindJSTypeAliasDeclaration +const KindJsxAttribute = ast.KindJsxAttribute +const KindJsxAttributes = ast.KindJsxAttributes +const KindJsxClosingElement = ast.KindJsxClosingElement +const KindJsxClosingFragment = ast.KindJsxClosingFragment +const KindJsxElement = ast.KindJsxElement +const KindJsxExpression = ast.KindJsxExpression +const KindJsxFragment = ast.KindJsxFragment +const KindJsxNamespacedName = ast.KindJsxNamespacedName +const KindJsxOpeningElement = ast.KindJsxOpeningElement +const KindJsxOpeningFragment = ast.KindJsxOpeningFragment +const KindJsxSelfClosingElement = ast.KindJsxSelfClosingElement +const KindJsxSpreadAttribute = ast.KindJsxSpreadAttribute +const KindJsxText = ast.KindJsxText +const KindJsxTextAllWhiteSpaces = ast.KindJsxTextAllWhiteSpaces +const KindKeyOfKeyword = ast.KindKeyOfKeyword +const KindLabeledStatement = ast.KindLabeledStatement +const KindLastAssignment = ast.KindLastAssignment +const KindLastBinaryOperator = ast.KindLastBinaryOperator +const KindLastCompoundAssignment = ast.KindLastCompoundAssignment +const KindLastContextualKeyword = ast.KindLastContextualKeyword +const KindLastFutureReservedWord = ast.KindLastFutureReservedWord +const KindLastJSDocNode = ast.KindLastJSDocNode +const KindLastJSDocTagNode = ast.KindLastJSDocTagNode +const KindLastKeyword = ast.KindLastKeyword +const KindLastLiteralToken = ast.KindLastLiteralToken +const KindLastPunctuation = ast.KindLastPunctuation +const KindLastReservedWord = ast.KindLastReservedWord +const KindLastStatement = ast.KindLastStatement +const KindLastTemplateToken = ast.KindLastTemplateToken +const KindLastToken = ast.KindLastToken +const KindLastTriviaToken = ast.KindLastTriviaToken +const KindLastTypeNode = ast.KindLastTypeNode +const KindLastUnaryOperator = ast.KindLastUnaryOperator +const KindLessThanEqualsToken = ast.KindLessThanEqualsToken +const KindLessThanLessThanEqualsToken = ast.KindLessThanLessThanEqualsToken +const KindLessThanLessThanToken = ast.KindLessThanLessThanToken +const KindLessThanSlashToken = ast.KindLessThanSlashToken +const KindLessThanToken = ast.KindLessThanToken +const KindLetKeyword = ast.KindLetKeyword +const KindLiteralType = ast.KindLiteralType +const KindMappedType = ast.KindMappedType +const KindMetaProperty = ast.KindMetaProperty +const KindMethodDeclaration = ast.KindMethodDeclaration +const KindMethodSignature = ast.KindMethodSignature +const KindMinusEqualsToken = ast.KindMinusEqualsToken +const KindMinusMinusToken = ast.KindMinusMinusToken +const KindMinusToken = ast.KindMinusToken +const KindMissingDeclaration = ast.KindMissingDeclaration +const KindModuleBlock = ast.KindModuleBlock +const KindModuleDeclaration = ast.KindModuleDeclaration +const KindModuleKeyword = ast.KindModuleKeyword +const KindMultiLineCommentTrivia = ast.KindMultiLineCommentTrivia +const KindNamedExports = ast.KindNamedExports +const KindNamedImports = ast.KindNamedImports +const KindNamedTupleMember = ast.KindNamedTupleMember +const KindNamespaceExport = ast.KindNamespaceExport +const KindNamespaceExportDeclaration = ast.KindNamespaceExportDeclaration +const KindNamespaceImport = ast.KindNamespaceImport +const KindNamespaceKeyword = ast.KindNamespaceKeyword +const KindNeverKeyword = ast.KindNeverKeyword +const KindNewExpression = ast.KindNewExpression +const KindNewKeyword = ast.KindNewKeyword +const KindNewLineTrivia = ast.KindNewLineTrivia +const KindNoSubstitutionTemplateLiteral = ast.KindNoSubstitutionTemplateLiteral +const KindNonNullExpression = ast.KindNonNullExpression +const KindNonTextFileMarkerTrivia = ast.KindNonTextFileMarkerTrivia +const KindNotEmittedStatement = ast.KindNotEmittedStatement +const KindNotEmittedTypeElement = ast.KindNotEmittedTypeElement +const KindNullKeyword = ast.KindNullKeyword +const KindNumberKeyword = ast.KindNumberKeyword +const KindNumericLiteral = ast.KindNumericLiteral +const KindObjectBindingPattern = ast.KindObjectBindingPattern +const KindObjectKeyword = ast.KindObjectKeyword +const KindObjectLiteralExpression = ast.KindObjectLiteralExpression +const KindOfKeyword = ast.KindOfKeyword +const KindOmittedExpression = ast.KindOmittedExpression +const KindOpenBraceToken = ast.KindOpenBraceToken +const KindOpenBracketToken = ast.KindOpenBracketToken +const KindOpenParenToken = ast.KindOpenParenToken +const KindOptionalType = ast.KindOptionalType +const KindOutKeyword = ast.KindOutKeyword +const KindOverrideKeyword = ast.KindOverrideKeyword +const KindPackageKeyword = ast.KindPackageKeyword +const KindParameter = ast.KindParameter +const KindParenthesizedExpression = ast.KindParenthesizedExpression +const KindParenthesizedType = ast.KindParenthesizedType +const KindPartiallyEmittedExpression = ast.KindPartiallyEmittedExpression +const KindPercentEqualsToken = ast.KindPercentEqualsToken +const KindPercentToken = ast.KindPercentToken +const KindPlusEqualsToken = ast.KindPlusEqualsToken +const KindPlusPlusToken = ast.KindPlusPlusToken +const KindPlusToken = ast.KindPlusToken +const KindPostfixUnaryExpression = ast.KindPostfixUnaryExpression +const KindPrefixUnaryExpression = ast.KindPrefixUnaryExpression +const KindPrivateIdentifier = ast.KindPrivateIdentifier +const KindPrivateKeyword = ast.KindPrivateKeyword +const KindPropertyAccessExpression = ast.KindPropertyAccessExpression +const KindPropertyAssignment = ast.KindPropertyAssignment +const KindPropertyDeclaration = ast.KindPropertyDeclaration +const KindPropertySignature = ast.KindPropertySignature +const KindProtectedKeyword = ast.KindProtectedKeyword +const KindPublicKeyword = ast.KindPublicKeyword +const KindQualifiedName = ast.KindQualifiedName +const KindQuestionDotToken = ast.KindQuestionDotToken +const KindQuestionQuestionEqualsToken = ast.KindQuestionQuestionEqualsToken +const KindQuestionQuestionToken = ast.KindQuestionQuestionToken +const KindQuestionToken = ast.KindQuestionToken +const KindReadonlyKeyword = ast.KindReadonlyKeyword +const KindRegularExpressionLiteral = ast.KindRegularExpressionLiteral +const KindRequireKeyword = ast.KindRequireKeyword +const KindRestType = ast.KindRestType +const KindReturnKeyword = ast.KindReturnKeyword +const KindReturnStatement = ast.KindReturnStatement +const KindSatisfiesExpression = ast.KindSatisfiesExpression +const KindSatisfiesKeyword = ast.KindSatisfiesKeyword +const KindSemicolonClassElement = ast.KindSemicolonClassElement +const KindSemicolonToken = ast.KindSemicolonToken +const KindSetAccessor = ast.KindSetAccessor +const KindSetKeyword = ast.KindSetKeyword +const KindShorthandPropertyAssignment = ast.KindShorthandPropertyAssignment +const KindSingleLineCommentTrivia = ast.KindSingleLineCommentTrivia +const KindSlashEqualsToken = ast.KindSlashEqualsToken +const KindSlashToken = ast.KindSlashToken +const KindSourceFile = ast.KindSourceFile +const KindSpreadAssignment = ast.KindSpreadAssignment +const KindSpreadElement = ast.KindSpreadElement +const KindStaticKeyword = ast.KindStaticKeyword +const KindStringKeyword = ast.KindStringKeyword +const KindStringLiteral = ast.KindStringLiteral +const KindSuperKeyword = ast.KindSuperKeyword +const KindSwitchKeyword = ast.KindSwitchKeyword +const KindSwitchStatement = ast.KindSwitchStatement +const KindSymbolKeyword = ast.KindSymbolKeyword +const KindSyntaxList = ast.KindSyntaxList +const KindSyntheticExpression = ast.KindSyntheticExpression +const KindSyntheticReferenceExpression = ast.KindSyntheticReferenceExpression +const KindTaggedTemplateExpression = ast.KindTaggedTemplateExpression +const KindTemplateExpression = ast.KindTemplateExpression +const KindTemplateHead = ast.KindTemplateHead +const KindTemplateLiteralType = ast.KindTemplateLiteralType +const KindTemplateLiteralTypeSpan = ast.KindTemplateLiteralTypeSpan +const KindTemplateMiddle = ast.KindTemplateMiddle +const KindTemplateSpan = ast.KindTemplateSpan +const KindTemplateTail = ast.KindTemplateTail +const KindThisKeyword = ast.KindThisKeyword +const KindThisType = ast.KindThisType +const KindThrowKeyword = ast.KindThrowKeyword +const KindThrowStatement = ast.KindThrowStatement +const KindTildeToken = ast.KindTildeToken +const KindTrueKeyword = ast.KindTrueKeyword +const KindTryKeyword = ast.KindTryKeyword +const KindTryStatement = ast.KindTryStatement +const KindTupleType = ast.KindTupleType +const KindTypeAliasDeclaration = ast.KindTypeAliasDeclaration +const KindTypeAssertionExpression = ast.KindTypeAssertionExpression +const KindTypeKeyword = ast.KindTypeKeyword +const KindTypeLiteral = ast.KindTypeLiteral +const KindTypeOfExpression = ast.KindTypeOfExpression +const KindTypeOfKeyword = ast.KindTypeOfKeyword +const KindTypeOperator = ast.KindTypeOperator +const KindTypeParameter = ast.KindTypeParameter +const KindTypePredicate = ast.KindTypePredicate +const KindTypeQuery = ast.KindTypeQuery +const KindTypeReference = ast.KindTypeReference +const KindUndefinedKeyword = ast.KindUndefinedKeyword +const KindUnionType = ast.KindUnionType +const KindUniqueKeyword = ast.KindUniqueKeyword +const KindUnknown = ast.KindUnknown +const KindUnknownKeyword = ast.KindUnknownKeyword +const KindUsingKeyword = ast.KindUsingKeyword +const KindVarKeyword = ast.KindVarKeyword +const KindVariableDeclaration = ast.KindVariableDeclaration +const KindVariableDeclarationList = ast.KindVariableDeclarationList +const KindVariableStatement = ast.KindVariableStatement +const KindVoidExpression = ast.KindVoidExpression +const KindVoidKeyword = ast.KindVoidKeyword +const KindWhileKeyword = ast.KindWhileKeyword +const KindWhileStatement = ast.KindWhileStatement +const KindWhitespaceTrivia = ast.KindWhitespaceTrivia +const KindWithKeyword = ast.KindWithKeyword +const KindWithStatement = ast.KindWithStatement +const KindYieldExpression = ast.KindYieldExpression +const KindYieldKeyword = ast.KindYieldKeyword +type LabeledStatement = ast.LabeledStatement +type LeftHandSideExpression = ast.LeftHandSideExpression +type LiteralExpression = ast.LiteralExpression +type LiteralLikeBase = ast.LiteralLikeBase +type LiteralLikeNode = ast.LiteralLikeNode +type LiteralType = ast.LiteralType +type LiteralTypeNode = ast.LiteralTypeNode +type LocalsContainerBase = ast.LocalsContainerBase +type MappedTypeNode = ast.MappedTypeNode +type MemberName = ast.MemberName +type MetaProperty = ast.MetaProperty +type MethodDeclaration = ast.MethodDeclaration +type MethodSignatureDeclaration = ast.MethodSignatureDeclaration +type MissingDeclaration = ast.MissingDeclaration +type ModifierFlags = ast.ModifierFlags +const ModifierFlagsAbstract = ast.ModifierFlagsAbstract +const ModifierFlagsAccessibilityModifier = ast.ModifierFlagsAccessibilityModifier +const ModifierFlagsAccessor = ast.ModifierFlagsAccessor +const ModifierFlagsAll = ast.ModifierFlagsAll +const ModifierFlagsAmbient = ast.ModifierFlagsAmbient +const ModifierFlagsAsync = ast.ModifierFlagsAsync +const ModifierFlagsConst = ast.ModifierFlagsConst +const ModifierFlagsDecorator = ast.ModifierFlagsDecorator +const ModifierFlagsDefault = ast.ModifierFlagsDefault +const ModifierFlagsDeprecated = ast.ModifierFlagsDeprecated +const ModifierFlagsExport = ast.ModifierFlagsExport +const ModifierFlagsExportDefault = ast.ModifierFlagsExportDefault +const ModifierFlagsHasComputedFlags = ast.ModifierFlagsHasComputedFlags +const ModifierFlagsHasComputedJSDocModifiers = ast.ModifierFlagsHasComputedJSDocModifiers +const ModifierFlagsIn = ast.ModifierFlagsIn +const ModifierFlagsJSDocCacheOnlyModifiers = ast.ModifierFlagsJSDocCacheOnlyModifiers +const ModifierFlagsJSDocOnlyModifiers = ast.ModifierFlagsJSDocOnlyModifiers +const ModifierFlagsJSDocOverride = ast.ModifierFlagsJSDocOverride +const ModifierFlagsJSDocPrivate = ast.ModifierFlagsJSDocPrivate +const ModifierFlagsJSDocProtected = ast.ModifierFlagsJSDocProtected +const ModifierFlagsJSDocPublic = ast.ModifierFlagsJSDocPublic +const ModifierFlagsJSDocReadonly = ast.ModifierFlagsJSDocReadonly +const ModifierFlagsJavaScript = ast.ModifierFlagsJavaScript +const ModifierFlagsModifier = ast.ModifierFlagsModifier +const ModifierFlagsNonCacheOnlyModifiers = ast.ModifierFlagsNonCacheOnlyModifiers +const ModifierFlagsNonPublicAccessibilityModifier = ast.ModifierFlagsNonPublicAccessibilityModifier +const ModifierFlagsNone = ast.ModifierFlagsNone +const ModifierFlagsOut = ast.ModifierFlagsOut +const ModifierFlagsOverride = ast.ModifierFlagsOverride +const ModifierFlagsParameterPropertyModifier = ast.ModifierFlagsParameterPropertyModifier +const ModifierFlagsPrivate = ast.ModifierFlagsPrivate +const ModifierFlagsProtected = ast.ModifierFlagsProtected +const ModifierFlagsPublic = ast.ModifierFlagsPublic +const ModifierFlagsReadonly = ast.ModifierFlagsReadonly +const ModifierFlagsStatic = ast.ModifierFlagsStatic +const ModifierFlagsSyntacticModifiers = ast.ModifierFlagsSyntacticModifiers +const ModifierFlagsSyntacticOnlyModifiers = ast.ModifierFlagsSyntacticOnlyModifiers +const ModifierFlagsSyntacticOrJSDocModifiers = ast.ModifierFlagsSyntacticOrJSDocModifiers +const ModifierFlagsTypeScriptModifier = ast.ModifierFlagsTypeScriptModifier +type ModifierLike = ast.ModifierLike +type ModifierList = ast.ModifierList +//go:linkname ModifierToFlag github.com/microsoft/typescript-go/internal/ast.ModifierToFlag +func ModifierToFlag(token ast.Kind) ast.ModifierFlags +type ModifiersBase = ast.ModifiersBase +//go:linkname ModifiersToFlags github.com/microsoft/typescript-go/internal/ast.ModifiersToFlags +func ModifiersToFlags(modifiers []*ast.Node) ast.ModifierFlags +type ModuleBlock = ast.ModuleBlock +type ModuleBody = ast.ModuleBody +type ModuleDeclaration = ast.ModuleDeclaration +type ModuleDeclarationNode = ast.ModuleDeclarationNode +type ModuleExportName = ast.ModuleExportName +//go:linkname ModuleExportNameIsDefault github.com/microsoft/typescript-go/internal/ast.ModuleExportNameIsDefault +func ModuleExportNameIsDefault(node *ast.Node) bool +type ModuleInstanceState = ast.ModuleInstanceState +const ModuleInstanceStateConstEnumOnly = ast.ModuleInstanceStateConstEnumOnly +const ModuleInstanceStateInstantiated = ast.ModuleInstanceStateInstantiated +const ModuleInstanceStateNonInstantiated = ast.ModuleInstanceStateNonInstantiated +const ModuleInstanceStateUnknown = ast.ModuleInstanceStateUnknown +type ModuleName = ast.ModuleName +type ModuleReference = ast.ModuleReference +type MutableNode = ast.MutableNode +type NamedExportBindings = ast.NamedExportBindings +type NamedExports = ast.NamedExports +type NamedExportsNode = ast.NamedExportsNode +type NamedImportBindings = ast.NamedImportBindings +type NamedImports = ast.NamedImports +type NamedImportsOrExports = ast.NamedImportsOrExports +type NamedMember = ast.NamedMember +type NamedMemberBase = ast.NamedMemberBase +type NamedTupleMember = ast.NamedTupleMember +type NamespaceExport = ast.NamespaceExport +type NamespaceExportDeclaration = ast.NamespaceExportDeclaration +type NamespaceImport = ast.NamespaceImport +//go:linkname NewCompilerDiagnostic github.com/microsoft/typescript-go/internal/ast.NewCompilerDiagnostic +func NewCompilerDiagnostic(message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname NewDiagnostic github.com/microsoft/typescript-go/internal/ast.NewDiagnostic +func NewDiagnostic(file *ast.SourceFile, loc core.TextRange, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname NewDiagnosticChain github.com/microsoft/typescript-go/internal/ast.NewDiagnosticChain +func NewDiagnosticChain(chain *ast.Diagnostic, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname NewDiagnosticFromSerialized github.com/microsoft/typescript-go/internal/ast.NewDiagnosticFromSerialized +func NewDiagnosticFromSerialized(file *ast.SourceFile, loc core.TextRange, code int32, category diagnostics.Category, messageKey diagnostics.Key, messageArgs []string, messageChain []*ast.Diagnostic, relatedInformation []*ast.Diagnostic, reportsUnnecessary bool, reportsDeprecated bool, skippedOnNoEmit bool) *ast.Diagnostic +type NewExpression = ast.NewExpression +//go:linkname NewFlowReduceLabelData github.com/microsoft/typescript-go/internal/ast.NewFlowReduceLabelData +func NewFlowReduceLabelData(target *ast.FlowLabel, antecedents *ast.FlowList) *ast.Node +//go:linkname NewFlowSwitchClauseData github.com/microsoft/typescript-go/internal/ast.NewFlowSwitchClauseData +func NewFlowSwitchClauseData(switchStatement *ast.Node, clauseStart int, clauseEnd int) *ast.Node +//go:linkname NewHasFileName github.com/microsoft/typescript-go/internal/ast.NewHasFileName +func NewHasFileName(fileName string, path tspath.Path) ast.HasFileName +//go:linkname NewNodeFactory github.com/microsoft/typescript-go/internal/ast.NewNodeFactory +func NewNodeFactory(hooks ast.NodeFactoryHooks) *ast.NodeFactory +//go:linkname NewNodeVisitor github.com/microsoft/typescript-go/internal/ast.NewNodeVisitor +func NewNodeVisitor(visit func(node *ast.Node) *ast.Node, factory *ast.NodeFactory, hooks ast.NodeVisitorHooks) *ast.NodeVisitor +type NoSubstitutionTemplateLiteral = ast.NoSubstitutionTemplateLiteral +type Node = ast.Node +//go:linkname Node_Type github.com/microsoft/typescript-go/internal/ast.(*Node).Type +func Node_Type(recv *ast.Node) *ast.Node +type NodeBase = ast.NodeBase +//go:linkname NodeCanBeDecorated github.com/microsoft/typescript-go/internal/ast.NodeCanBeDecorated +func NodeCanBeDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.Node, grandparent *ast.Node) bool +type NodeDefault = ast.NodeDefault +type NodeFactory = ast.NodeFactory +type NodeFactoryCoercible = ast.NodeFactoryCoercible +type NodeFactoryHooks = ast.NodeFactoryHooks +type NodeFlags = ast.NodeFlags +const NodeFlagsAmbient = ast.NodeFlagsAmbient +const NodeFlagsAwaitContext = ast.NodeFlagsAwaitContext +const NodeFlagsAwaitUsing = ast.NodeFlagsAwaitUsing +const NodeFlagsBlockScoped = ast.NodeFlagsBlockScoped +const NodeFlagsConst = ast.NodeFlagsConst +const NodeFlagsConstant = ast.NodeFlagsConstant +const NodeFlagsContainsThis = ast.NodeFlagsContainsThis +const NodeFlagsContextFlags = ast.NodeFlagsContextFlags +const NodeFlagsDecoratorContext = ast.NodeFlagsDecoratorContext +const NodeFlagsDisallowConditionalTypesContext = ast.NodeFlagsDisallowConditionalTypesContext +const NodeFlagsDisallowInContext = ast.NodeFlagsDisallowInContext +const NodeFlagsExportContext = ast.NodeFlagsExportContext +const NodeFlagsHasExplicitReturn = ast.NodeFlagsHasExplicitReturn +const NodeFlagsHasImplicitReturn = ast.NodeFlagsHasImplicitReturn +const NodeFlagsHasJSDoc = ast.NodeFlagsHasJSDoc +const NodeFlagsIdentifierHasExtendedUnicodeEscape = ast.NodeFlagsIdentifierHasExtendedUnicodeEscape +const NodeFlagsInWithStatement = ast.NodeFlagsInWithStatement +const NodeFlagsJSDoc = ast.NodeFlagsJSDoc +const NodeFlagsJavaScriptFile = ast.NodeFlagsJavaScriptFile +const NodeFlagsJsonFile = ast.NodeFlagsJsonFile +const NodeFlagsLet = ast.NodeFlagsLet +const NodeFlagsNone = ast.NodeFlagsNone +const NodeFlagsOptionalChain = ast.NodeFlagsOptionalChain +const NodeFlagsPermanentlySetIncrementalFlags = ast.NodeFlagsPermanentlySetIncrementalFlags +const NodeFlagsPossiblyContainsDeprecatedTag = ast.NodeFlagsPossiblyContainsDeprecatedTag +const NodeFlagsPossiblyContainsDynamicImport = ast.NodeFlagsPossiblyContainsDynamicImport +const NodeFlagsPossiblyContainsImportMeta = ast.NodeFlagsPossiblyContainsImportMeta +const NodeFlagsReachabilityCheckFlags = ast.NodeFlagsReachabilityCheckFlags +const NodeFlagsReparsed = ast.NodeFlagsReparsed +const NodeFlagsSynthesized = ast.NodeFlagsSynthesized +const NodeFlagsThisNodeHasError = ast.NodeFlagsThisNodeHasError +const NodeFlagsThisNodeOrAnySubNodesHasError = ast.NodeFlagsThisNodeOrAnySubNodesHasError +const NodeFlagsTypeExcludesFlags = ast.NodeFlagsTypeExcludesFlags +const NodeFlagsUnreachable = ast.NodeFlagsUnreachable +const NodeFlagsUsing = ast.NodeFlagsUsing +const NodeFlagsYieldContext = ast.NodeFlagsYieldContext +//go:linkname NodeHasKind github.com/microsoft/typescript-go/internal/ast.NodeHasKind +func NodeHasKind(node *ast.Node, kind ast.Kind) bool +//go:linkname NodeHasName github.com/microsoft/typescript-go/internal/ast.NodeHasName +func NodeHasName(statement *ast.Node, id *ast.Node) bool +type NodeId = ast.NodeId +//go:linkname NodeIsDecorated github.com/microsoft/typescript-go/internal/ast.NodeIsDecorated +func NodeIsDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.Node, grandparent *ast.Node) bool +//go:linkname NodeIsMissing github.com/microsoft/typescript-go/internal/ast.NodeIsMissing +func NodeIsMissing(node *ast.Node) bool +//go:linkname NodeIsPresent github.com/microsoft/typescript-go/internal/ast.NodeIsPresent +func NodeIsPresent(node *ast.Node) bool +//go:linkname NodeIsSynthesized github.com/microsoft/typescript-go/internal/ast.NodeIsSynthesized +func NodeIsSynthesized(node *ast.Node) bool +//go:linkname NodeKindIs github.com/microsoft/typescript-go/internal/ast.NodeKindIs +func NodeKindIs(node *ast.Node, kinds ...ast.Kind) bool +type NodeList = ast.NodeList +//go:linkname NodeOrChildIsDecorated github.com/microsoft/typescript-go/internal/ast.NodeOrChildIsDecorated +func NodeOrChildIsDecorated(useLegacyDecorators bool, node *ast.Node, parent *ast.Node, grandparent *ast.Node) bool +type NodeVisitor = ast.NodeVisitor +type NodeVisitorHooks = ast.NodeVisitorHooks +type NonNullExpression = ast.NonNullExpression +type NotEmittedStatement = ast.NotEmittedStatement +type NotEmittedTypeElement = ast.NotEmittedTypeElement +type NumericLiteral = ast.NumericLiteral +type NumericOrStringLikeLiteral = ast.NumericOrStringLikeLiteral +const OEKAll = ast.OEKAll +const OEKAssertions = ast.OEKAssertions +const OEKExcludeJSDocTypeAssertion = ast.OEKExcludeJSDocTypeAssertion +const OEKExpressionsWithTypeArguments = ast.OEKExpressionsWithTypeArguments +const OEKNonNullAssertions = ast.OEKNonNullAssertions +const OEKParentheses = ast.OEKParentheses +const OEKPartiallyEmittedExpressions = ast.OEKPartiallyEmittedExpressions +const OEKSatisfies = ast.OEKSatisfies +const OEKTypeAssertions = ast.OEKTypeAssertions +type ObjectLiteralElement = ast.ObjectLiteralElement +type ObjectLiteralElementBase = ast.ObjectLiteralElementBase +type ObjectLiteralExpression = ast.ObjectLiteralExpression +type ObjectLiteralExpressionNode = ast.ObjectLiteralExpressionNode +type ObjectLiteralLike = ast.ObjectLiteralLike +type ObjectTypeDeclaration = ast.ObjectTypeDeclaration +type OmittedExpression = ast.OmittedExpression +type OperatorPrecedence = ast.OperatorPrecedence +const OperatorPrecedenceAdditive = ast.OperatorPrecedenceAdditive +const OperatorPrecedenceAssignment = ast.OperatorPrecedenceAssignment +const OperatorPrecedenceBitwiseAND = ast.OperatorPrecedenceBitwiseAND +const OperatorPrecedenceBitwiseOR = ast.OperatorPrecedenceBitwiseOR +const OperatorPrecedenceBitwiseXOR = ast.OperatorPrecedenceBitwiseXOR +const OperatorPrecedenceCoalesce = ast.OperatorPrecedenceCoalesce +const OperatorPrecedenceComma = ast.OperatorPrecedenceComma +const OperatorPrecedenceConditional = ast.OperatorPrecedenceConditional +const OperatorPrecedenceDisallowComma = ast.OperatorPrecedenceDisallowComma +const OperatorPrecedenceEquality = ast.OperatorPrecedenceEquality +const OperatorPrecedenceExponentiation = ast.OperatorPrecedenceExponentiation +type OperatorPrecedenceFlags = ast.OperatorPrecedenceFlags +const OperatorPrecedenceFlagsNewWithoutArguments = ast.OperatorPrecedenceFlagsNewWithoutArguments +const OperatorPrecedenceFlagsNone = ast.OperatorPrecedenceFlagsNone +const OperatorPrecedenceFlagsOptionalChain = ast.OperatorPrecedenceFlagsOptionalChain +const OperatorPrecedenceHighest = ast.OperatorPrecedenceHighest +const OperatorPrecedenceInvalid = ast.OperatorPrecedenceInvalid +const OperatorPrecedenceLeftHandSide = ast.OperatorPrecedenceLeftHandSide +const OperatorPrecedenceLogicalAND = ast.OperatorPrecedenceLogicalAND +const OperatorPrecedenceLogicalOR = ast.OperatorPrecedenceLogicalOR +const OperatorPrecedenceLowest = ast.OperatorPrecedenceLowest +const OperatorPrecedenceMember = ast.OperatorPrecedenceMember +const OperatorPrecedenceMultiplicative = ast.OperatorPrecedenceMultiplicative +const OperatorPrecedenceOptionalChain = ast.OperatorPrecedenceOptionalChain +const OperatorPrecedenceParentheses = ast.OperatorPrecedenceParentheses +const OperatorPrecedencePrimary = ast.OperatorPrecedencePrimary +const OperatorPrecedenceRelational = ast.OperatorPrecedenceRelational +const OperatorPrecedenceShift = ast.OperatorPrecedenceShift +const OperatorPrecedenceSpread = ast.OperatorPrecedenceSpread +const OperatorPrecedenceUnary = ast.OperatorPrecedenceUnary +const OperatorPrecedenceUpdate = ast.OperatorPrecedenceUpdate +const OperatorPrecedenceYield = ast.OperatorPrecedenceYield +type OptionalTypeNode = ast.OptionalTypeNode +type OuterExpressionKinds = ast.OuterExpressionKinds +type ParameterDeclaration = ast.ParameterDeclaration +type ParameterDeclarationNode = ast.ParameterDeclarationNode +type ParameterList = ast.ParameterList +type ParenthesizedExpression = ast.ParenthesizedExpression +type ParenthesizedTypeNode = ast.ParenthesizedTypeNode +type PartiallyEmittedExpression = ast.PartiallyEmittedExpression +type PatternAmbientModule = ast.PatternAmbientModule +//go:linkname PositionIsSynthesized github.com/microsoft/typescript-go/internal/ast.PositionIsSynthesized +func PositionIsSynthesized(pos int) bool +type PositionMap = ast.PositionMap +type PostfixUnaryExpression = ast.PostfixUnaryExpression +type Pragma = ast.Pragma +type PragmaArgument = ast.PragmaArgument +type PragmaArgumentSpecification = ast.PragmaArgumentSpecification +const PragmaKindAll = ast.PragmaKindAll +const PragmaKindDefault = ast.PragmaKindDefault +type PragmaKindFlags = ast.PragmaKindFlags +const PragmaKindFlagsNone = ast.PragmaKindFlagsNone +const PragmaKindMultiLine = ast.PragmaKindMultiLine +const PragmaKindSingleLine = ast.PragmaKindSingleLine +const PragmaKindTripleSlashXML = ast.PragmaKindTripleSlashXML +type PragmaSpecification = ast.PragmaSpecification +type PrefixUnaryExpression = ast.PrefixUnaryExpression +type PrivateIdentifier = ast.PrivateIdentifier +type PrivateIdentifierNode = ast.PrivateIdentifierNode +type PropertyAccessExpression = ast.PropertyAccessExpression +type PropertyAccessExpressionNode = ast.PropertyAccessExpressionNode +type PropertyAssignment = ast.PropertyAssignment +type PropertyDeclaration = ast.PropertyDeclaration +type PropertyDefinitionList = ast.PropertyDefinitionList +type PropertyName = ast.PropertyName +type PropertySignatureDeclaration = ast.PropertySignatureDeclaration +type QualifiedName = ast.QualifiedName +//go:linkname RangeIsSynthesized github.com/microsoft/typescript-go/internal/ast.RangeIsSynthesized +func RangeIsSynthesized(loc core.TextRange) bool +type RegularExpressionLiteral = ast.RegularExpressionLiteral +//go:linkname ReplaceModifiers github.com/microsoft/typescript-go/internal/ast.ReplaceModifiers +func ReplaceModifiers(factory *ast.NodeFactory, node *ast.Node, modifierArray *ast.ModifierList) *ast.Node +type RepopulateDiagnosticInfo = ast.RepopulateDiagnosticInfo +type RepopulateDiagnosticKind = ast.RepopulateDiagnosticKind +const RepopulateModeMismatch = ast.RepopulateModeMismatch +const RepopulateModuleNotFound = ast.RepopulateModuleNotFound +type RestTypeNode = ast.RestTypeNode +type ReturnStatement = ast.ReturnStatement +type SatisfiesExpression = ast.SatisfiesExpression +type SemanticMeaning = ast.SemanticMeaning +const SemanticMeaningAll = ast.SemanticMeaningAll +const SemanticMeaningNamespace = ast.SemanticMeaningNamespace +const SemanticMeaningNone = ast.SemanticMeaningNone +const SemanticMeaningType = ast.SemanticMeaningType +const SemanticMeaningValue = ast.SemanticMeaningValue +type SemicolonClassElement = ast.SemicolonClassElement +type SetAccessorDeclaration = ast.SetAccessorDeclaration +//go:linkname SetExternalModuleIndicator github.com/microsoft/typescript-go/internal/ast.SetExternalModuleIndicator +func SetExternalModuleIndicator(file *ast.SourceFile, opts ast.ExternalModuleIndicatorOptions) +//go:linkname SetImportsOfSourceFile github.com/microsoft/typescript-go/internal/ast.SetImportsOfSourceFile +func SetImportsOfSourceFile(node *ast.SourceFile, imports []*ast.LiteralLikeNode) +//go:linkname SetParentInChildren github.com/microsoft/typescript-go/internal/ast.SetParentInChildren +func SetParentInChildren(node *ast.Node) +//go:linkname SetParseJSDocForNode github.com/microsoft/typescript-go/internal/ast.SetParseJSDocForNode +func SetParseJSDocForNode(fn func(*ast.SourceFile, *ast.Node) []*ast.Node) +type ShorthandPropertyAssignment = ast.ShorthandPropertyAssignment +//go:linkname ShouldTransformImportCall github.com/microsoft/typescript-go/internal/ast.ShouldTransformImportCall +func ShouldTransformImportCall(fileName string, options *core.CompilerOptions, impliedNodeFormatForEmit core.ModuleKind) bool +type SignatureDeclaration = ast.SignatureDeclaration +//go:linkname SkipOuterExpressions github.com/microsoft/typescript-go/internal/ast.SkipOuterExpressions +func SkipOuterExpressions(node *ast.Expression, kinds ast.OuterExpressionKinds) *ast.Expression +//go:linkname SkipParentheses github.com/microsoft/typescript-go/internal/ast.SkipParentheses +func SkipParentheses(node *ast.Expression) *ast.Expression +//go:linkname SkipPartiallyEmittedExpressions github.com/microsoft/typescript-go/internal/ast.SkipPartiallyEmittedExpressions +func SkipPartiallyEmittedExpressions(node *ast.Expression) *ast.Expression +//go:linkname SkipTypeParentheses github.com/microsoft/typescript-go/internal/ast.SkipTypeParentheses +func SkipTypeParentheses(node *ast.Node) *ast.Node +type SourceFile = ast.SourceFile +type SourceFileLike = ast.SourceFileLike +type SourceFileMetaData = ast.SourceFileMetaData +type SourceFileNode = ast.SourceFileNode +type SourceFileParseOptions = ast.SourceFileParseOptions +type SpreadAssignment = ast.SpreadAssignment +type SpreadElement = ast.SpreadElement +type Statement = ast.Statement +type StatementBase = ast.StatementBase +type StatementList = ast.StatementList +type StringLiteral = ast.StringLiteral +type StringLiteralLike = ast.StringLiteralLike +type StringLiteralNode = ast.StringLiteralNode +const SubtreeContainsAnyAwait = ast.SubtreeContainsAnyAwait +const SubtreeContainsAwait = ast.SubtreeContainsAwait +const SubtreeContainsClassFields = ast.SubtreeContainsClassFields +const SubtreeContainsClassStaticBlocks = ast.SubtreeContainsClassStaticBlocks +const SubtreeContainsDecorators = ast.SubtreeContainsDecorators +const SubtreeContainsDynamicImport = ast.SubtreeContainsDynamicImport +const SubtreeContainsES2016 = ast.SubtreeContainsES2016 +const SubtreeContainsES2017 = ast.SubtreeContainsES2017 +const SubtreeContainsES2018 = ast.SubtreeContainsES2018 +const SubtreeContainsES2019 = ast.SubtreeContainsES2019 +const SubtreeContainsES2020 = ast.SubtreeContainsES2020 +const SubtreeContainsES2021 = ast.SubtreeContainsES2021 +const SubtreeContainsES2022 = ast.SubtreeContainsES2022 +const SubtreeContainsESClassFields = ast.SubtreeContainsESClassFields +const SubtreeContainsESDecorators = ast.SubtreeContainsESDecorators +const SubtreeContainsESNext = ast.SubtreeContainsESNext +const SubtreeContainsESObjectRestOrSpread = ast.SubtreeContainsESObjectRestOrSpread +const SubtreeContainsExponentiationOperator = ast.SubtreeContainsExponentiationOperator +const SubtreeContainsForAwaitOrAsyncGenerator = ast.SubtreeContainsForAwaitOrAsyncGenerator +const SubtreeContainsIdentifier = ast.SubtreeContainsIdentifier +const SubtreeContainsInvalidTemplateEscape = ast.SubtreeContainsInvalidTemplateEscape +const SubtreeContainsJsx = ast.SubtreeContainsJsx +const SubtreeContainsLexicalSuper = ast.SubtreeContainsLexicalSuper +const SubtreeContainsLexicalThis = ast.SubtreeContainsLexicalThis +const SubtreeContainsLexicalThisOrSuper = ast.SubtreeContainsLexicalThisOrSuper +const SubtreeContainsLogicalAssignments = ast.SubtreeContainsLogicalAssignments +const SubtreeContainsMissingCatchClauseVariable = ast.SubtreeContainsMissingCatchClauseVariable +const SubtreeContainsNullishCoalescing = ast.SubtreeContainsNullishCoalescing +const SubtreeContainsObjectRestOrSpread = ast.SubtreeContainsObjectRestOrSpread +const SubtreeContainsOptionalChaining = ast.SubtreeContainsOptionalChaining +const SubtreeContainsPrivateIdentifierInExpression = ast.SubtreeContainsPrivateIdentifierInExpression +const SubtreeContainsRestOrSpread = ast.SubtreeContainsRestOrSpread +const SubtreeContainsTypeScript = ast.SubtreeContainsTypeScript +const SubtreeContainsUsing = ast.SubtreeContainsUsing +const SubtreeExclusionsAccessor = ast.SubtreeExclusionsAccessor +const SubtreeExclusionsArrayLiteral = ast.SubtreeExclusionsArrayLiteral +const SubtreeExclusionsArrowFunction = ast.SubtreeExclusionsArrowFunction +const SubtreeExclusionsBindingPattern = ast.SubtreeExclusionsBindingPattern +const SubtreeExclusionsCall = ast.SubtreeExclusionsCall +const SubtreeExclusionsCatchClause = ast.SubtreeExclusionsCatchClause +const SubtreeExclusionsClass = ast.SubtreeExclusionsClass +const SubtreeExclusionsConstructor = ast.SubtreeExclusionsConstructor +const SubtreeExclusionsElementAccess = ast.SubtreeExclusionsElementAccess +const SubtreeExclusionsEraseable = ast.SubtreeExclusionsEraseable +const SubtreeExclusionsFunction = ast.SubtreeExclusionsFunction +const SubtreeExclusionsMethod = ast.SubtreeExclusionsMethod +const SubtreeExclusionsModule = ast.SubtreeExclusionsModule +const SubtreeExclusionsNew = ast.SubtreeExclusionsNew +const SubtreeExclusionsNode = ast.SubtreeExclusionsNode +const SubtreeExclusionsObjectLiteral = ast.SubtreeExclusionsObjectLiteral +const SubtreeExclusionsOuterExpression = ast.SubtreeExclusionsOuterExpression +const SubtreeExclusionsParameter = ast.SubtreeExclusionsParameter +const SubtreeExclusionsProperty = ast.SubtreeExclusionsProperty +const SubtreeExclusionsPropertyAccess = ast.SubtreeExclusionsPropertyAccess +const SubtreeExclusionsVariableDeclarationList = ast.SubtreeExclusionsVariableDeclarationList +type SubtreeFacts = ast.SubtreeFacts +const SubtreeFactsComputed = ast.SubtreeFactsComputed +const SubtreeFactsNone = ast.SubtreeFactsNone +type SwitchStatement = ast.SwitchStatement +type Symbol = ast.Symbol +type SymbolFlags = ast.SymbolFlags +const SymbolFlagsAccessor = ast.SymbolFlagsAccessor +const SymbolFlagsAccessorExcludes = ast.SymbolFlagsAccessorExcludes +const SymbolFlagsAlias = ast.SymbolFlagsAlias +const SymbolFlagsAliasExcludes = ast.SymbolFlagsAliasExcludes +const SymbolFlagsAll = ast.SymbolFlagsAll +const SymbolFlagsAssignment = ast.SymbolFlagsAssignment +const SymbolFlagsBlockScoped = ast.SymbolFlagsBlockScoped +const SymbolFlagsBlockScopedVariable = ast.SymbolFlagsBlockScopedVariable +const SymbolFlagsBlockScopedVariableExcludes = ast.SymbolFlagsBlockScopedVariableExcludes +const SymbolFlagsClass = ast.SymbolFlagsClass +const SymbolFlagsClassExcludes = ast.SymbolFlagsClassExcludes +const SymbolFlagsClassMember = ast.SymbolFlagsClassMember +const SymbolFlagsClassifiable = ast.SymbolFlagsClassifiable +const SymbolFlagsConstEnum = ast.SymbolFlagsConstEnum +const SymbolFlagsConstEnumExcludes = ast.SymbolFlagsConstEnumExcludes +const SymbolFlagsConstEnumOnlyModule = ast.SymbolFlagsConstEnumOnlyModule +const SymbolFlagsConstructor = ast.SymbolFlagsConstructor +const SymbolFlagsEnum = ast.SymbolFlagsEnum +const SymbolFlagsEnumMember = ast.SymbolFlagsEnumMember +const SymbolFlagsEnumMemberExcludes = ast.SymbolFlagsEnumMemberExcludes +const SymbolFlagsExportDoesNotSupportDefaultModifier = ast.SymbolFlagsExportDoesNotSupportDefaultModifier +const SymbolFlagsExportHasLocal = ast.SymbolFlagsExportHasLocal +const SymbolFlagsExportStar = ast.SymbolFlagsExportStar +const SymbolFlagsExportSupportsDefaultModifier = ast.SymbolFlagsExportSupportsDefaultModifier +const SymbolFlagsExportValue = ast.SymbolFlagsExportValue +const SymbolFlagsFunction = ast.SymbolFlagsFunction +const SymbolFlagsFunctionExcludes = ast.SymbolFlagsFunctionExcludes +const SymbolFlagsFunctionScopedVariable = ast.SymbolFlagsFunctionScopedVariable +const SymbolFlagsFunctionScopedVariableExcludes = ast.SymbolFlagsFunctionScopedVariableExcludes +const SymbolFlagsGetAccessor = ast.SymbolFlagsGetAccessor +const SymbolFlagsGetAccessorExcludes = ast.SymbolFlagsGetAccessorExcludes +const SymbolFlagsGlobalLookup = ast.SymbolFlagsGlobalLookup +const SymbolFlagsInterface = ast.SymbolFlagsInterface +const SymbolFlagsInterfaceExcludes = ast.SymbolFlagsInterfaceExcludes +const SymbolFlagsLateBindingContainer = ast.SymbolFlagsLateBindingContainer +const SymbolFlagsMethod = ast.SymbolFlagsMethod +const SymbolFlagsMethodExcludes = ast.SymbolFlagsMethodExcludes +const SymbolFlagsModule = ast.SymbolFlagsModule +const SymbolFlagsModuleExports = ast.SymbolFlagsModuleExports +const SymbolFlagsModuleMember = ast.SymbolFlagsModuleMember +const SymbolFlagsNamespace = ast.SymbolFlagsNamespace +const SymbolFlagsNamespaceModule = ast.SymbolFlagsNamespaceModule +const SymbolFlagsNamespaceModuleExcludes = ast.SymbolFlagsNamespaceModuleExcludes +const SymbolFlagsNone = ast.SymbolFlagsNone +const SymbolFlagsObjectLiteral = ast.SymbolFlagsObjectLiteral +const SymbolFlagsOptional = ast.SymbolFlagsOptional +const SymbolFlagsParameterExcludes = ast.SymbolFlagsParameterExcludes +const SymbolFlagsProperty = ast.SymbolFlagsProperty +const SymbolFlagsPropertyExcludes = ast.SymbolFlagsPropertyExcludes +const SymbolFlagsPropertyOrAccessor = ast.SymbolFlagsPropertyOrAccessor +const SymbolFlagsPrototype = ast.SymbolFlagsPrototype +const SymbolFlagsRegularEnum = ast.SymbolFlagsRegularEnum +const SymbolFlagsRegularEnumExcludes = ast.SymbolFlagsRegularEnumExcludes +const SymbolFlagsReplaceableByMethod = ast.SymbolFlagsReplaceableByMethod +const SymbolFlagsSetAccessor = ast.SymbolFlagsSetAccessor +const SymbolFlagsSetAccessorExcludes = ast.SymbolFlagsSetAccessorExcludes +const SymbolFlagsSignature = ast.SymbolFlagsSignature +const SymbolFlagsTransient = ast.SymbolFlagsTransient +const SymbolFlagsType = ast.SymbolFlagsType +const SymbolFlagsTypeAlias = ast.SymbolFlagsTypeAlias +const SymbolFlagsTypeAliasExcludes = ast.SymbolFlagsTypeAliasExcludes +const SymbolFlagsTypeLiteral = ast.SymbolFlagsTypeLiteral +const SymbolFlagsTypeParameter = ast.SymbolFlagsTypeParameter +const SymbolFlagsTypeParameterExcludes = ast.SymbolFlagsTypeParameterExcludes +const SymbolFlagsValue = ast.SymbolFlagsValue +const SymbolFlagsValueModule = ast.SymbolFlagsValueModule +const SymbolFlagsValueModuleExcludes = ast.SymbolFlagsValueModuleExcludes +const SymbolFlagsVariable = ast.SymbolFlagsVariable +type SymbolId = ast.SymbolId +//go:linkname SymbolName github.com/microsoft/typescript-go/internal/ast.SymbolName +func SymbolName(symbol *ast.Symbol) string +type SymbolTable = ast.SymbolTable +type SyntaxList = ast.SyntaxList +type SyntheticExpression = ast.SyntheticExpression +type SyntheticReferenceExpression = ast.SyntheticReferenceExpression +//go:linkname TagNamesAreEquivalent github.com/microsoft/typescript-go/internal/ast.TagNamesAreEquivalent +func TagNamesAreEquivalent(lhs *ast.Expression, rhs *ast.Expression) bool +type TaggedTemplateExpression = ast.TaggedTemplateExpression +type TemplateExpression = ast.TemplateExpression +type TemplateHead = ast.TemplateHead +type TemplateHeadNode = ast.TemplateHeadNode +type TemplateLiteral = ast.TemplateLiteral +type TemplateLiteralLikeBase = ast.TemplateLiteralLikeBase +type TemplateLiteralLikeNode = ast.TemplateLiteralLikeNode +type TemplateLiteralTypeNode = ast.TemplateLiteralTypeNode +type TemplateLiteralTypeSpan = ast.TemplateLiteralTypeSpan +type TemplateLiteralTypeSpanList = ast.TemplateLiteralTypeSpanList +type TemplateLiteralTypeSpanNode = ast.TemplateLiteralTypeSpanNode +type TemplateMiddle = ast.TemplateMiddle +type TemplateMiddleNode = ast.TemplateMiddleNode +type TemplateMiddleOrTail = ast.TemplateMiddleOrTail +type TemplateSpan = ast.TemplateSpan +type TemplateSpanList = ast.TemplateSpanList +type TemplateSpanNode = ast.TemplateSpanNode +type TemplateTail = ast.TemplateTail +type TemplateTailNode = ast.TemplateTailNode +type ThisTypeNode = ast.ThisTypeNode +type ThrowStatement = ast.ThrowStatement +//go:linkname ToFindAncestorResult github.com/microsoft/typescript-go/internal/ast.ToFindAncestorResult +func ToFindAncestorResult(b bool) ast.FindAncestorResult +type Token = ast.Token +type TokenCacheKey = ast.TokenCacheKey +type TokenFlags = ast.TokenFlags +const TokenFlagsBinaryOrOctalSpecifier = ast.TokenFlagsBinaryOrOctalSpecifier +const TokenFlagsBinarySpecifier = ast.TokenFlagsBinarySpecifier +const TokenFlagsContainsInvalidEscape = ast.TokenFlagsContainsInvalidEscape +const TokenFlagsContainsInvalidSeparator = ast.TokenFlagsContainsInvalidSeparator +const TokenFlagsContainsLeadingZero = ast.TokenFlagsContainsLeadingZero +const TokenFlagsContainsSeparator = ast.TokenFlagsContainsSeparator +const TokenFlagsExtendedUnicodeEscape = ast.TokenFlagsExtendedUnicodeEscape +const TokenFlagsHexEscape = ast.TokenFlagsHexEscape +const TokenFlagsHexSpecifier = ast.TokenFlagsHexSpecifier +const TokenFlagsIsInvalid = ast.TokenFlagsIsInvalid +const TokenFlagsNone = ast.TokenFlagsNone +const TokenFlagsNumericLiteralFlags = ast.TokenFlagsNumericLiteralFlags +const TokenFlagsOctal = ast.TokenFlagsOctal +const TokenFlagsOctalSpecifier = ast.TokenFlagsOctalSpecifier +const TokenFlagsPrecedingJSDocComment = ast.TokenFlagsPrecedingJSDocComment +const TokenFlagsPrecedingJSDocLeadingAsterisks = ast.TokenFlagsPrecedingJSDocLeadingAsterisks +const TokenFlagsPrecedingJSDocWithDeprecated = ast.TokenFlagsPrecedingJSDocWithDeprecated +const TokenFlagsPrecedingJSDocWithSeeOrLink = ast.TokenFlagsPrecedingJSDocWithSeeOrLink +const TokenFlagsPrecedingLineBreak = ast.TokenFlagsPrecedingLineBreak +const TokenFlagsRegularExpressionLiteralFlags = ast.TokenFlagsRegularExpressionLiteralFlags +const TokenFlagsScientific = ast.TokenFlagsScientific +const TokenFlagsSingleQuote = ast.TokenFlagsSingleQuote +const TokenFlagsStringLiteralFlags = ast.TokenFlagsStringLiteralFlags +const TokenFlagsTemplateLiteralLikeFlags = ast.TokenFlagsTemplateLiteralLikeFlags +const TokenFlagsUnicodeEscape = ast.TokenFlagsUnicodeEscape +const TokenFlagsUnterminated = ast.TokenFlagsUnterminated +const TokenFlagsWithSpecifier = ast.TokenFlagsWithSpecifier +type TokenNode = ast.TokenNode +//go:linkname TryGetClassExtendingExpressionWithTypeArguments github.com/microsoft/typescript-go/internal/ast.TryGetClassExtendingExpressionWithTypeArguments +func TryGetClassExtendingExpressionWithTypeArguments(node *ast.Node) *ast.ClassLikeDeclaration +//go:linkname TryGetClassImplementingOrExtendingExpressionWithTypeArguments github.com/microsoft/typescript-go/internal/ast.TryGetClassImplementingOrExtendingExpressionWithTypeArguments +func TryGetClassImplementingOrExtendingExpressionWithTypeArguments(node *ast.Node) (class *ast.ClassLikeDeclaration, isImplements bool) +//go:linkname TryGetImportFromModuleSpecifier github.com/microsoft/typescript-go/internal/ast.TryGetImportFromModuleSpecifier +func TryGetImportFromModuleSpecifier(node *ast.StringLiteralLike) *ast.Node +//go:linkname TryGetPropertyNameOfBindingOrAssignmentElement github.com/microsoft/typescript-go/internal/ast.TryGetPropertyNameOfBindingOrAssignmentElement +func TryGetPropertyNameOfBindingOrAssignmentElement(bindingElement *ast.Node) *ast.Node +//go:linkname TryGetTextOfPropertyName github.com/microsoft/typescript-go/internal/ast.TryGetTextOfPropertyName +func TryGetTextOfPropertyName(name *ast.Node) (string, bool) +type TryStatement = ast.TryStatement +type TupleTypeNode = ast.TupleTypeNode +type TypeAliasDeclaration = ast.TypeAliasDeclaration +type TypeArgumentList = ast.TypeArgumentList +type TypeAssertion = ast.TypeAssertion +type TypeElement = ast.TypeElement +type TypeElementBase = ast.TypeElementBase +type TypeElementList = ast.TypeElementList +type TypeList = ast.TypeList +type TypeLiteral = ast.TypeLiteral +type TypeLiteralNode = ast.TypeLiteralNode +type TypeNode = ast.TypeNode +type TypeNodeBase = ast.TypeNodeBase +type TypeOfExpression = ast.TypeOfExpression +type TypeOnlyImportDeclaration = ast.TypeOnlyImportDeclaration +type TypeOperatorNode = ast.TypeOperatorNode +type TypeParameterDeclaration = ast.TypeParameterDeclaration +type TypeParameterDeclarationNode = ast.TypeParameterDeclarationNode +type TypeParameterList = ast.TypeParameterList +type TypePrecedence = ast.TypePrecedence +const TypePrecedenceConditional = ast.TypePrecedenceConditional +const TypePrecedenceFunction = ast.TypePrecedenceFunction +const TypePrecedenceHighest = ast.TypePrecedenceHighest +const TypePrecedenceIntersection = ast.TypePrecedenceIntersection +const TypePrecedenceJSDoc = ast.TypePrecedenceJSDoc +const TypePrecedenceLowest = ast.TypePrecedenceLowest +const TypePrecedenceNonArray = ast.TypePrecedenceNonArray +const TypePrecedencePostfix = ast.TypePrecedencePostfix +const TypePrecedenceTypeOperator = ast.TypePrecedenceTypeOperator +const TypePrecedenceUnion = ast.TypePrecedenceUnion +type TypePredicateNode = ast.TypePredicateNode +type TypePredicateNodeNode = ast.TypePredicateNodeNode +type TypePredicateParameterName = ast.TypePredicateParameterName +type TypeQueryNode = ast.TypeQueryNode +type TypeReferenceNode = ast.TypeReferenceNode +type UnionOrIntersectionTypeNode = ast.UnionOrIntersectionTypeNode +type UnionOrIntersectionTypeNodeBase = ast.UnionOrIntersectionTypeNodeBase +type UnionType = ast.UnionType +type UnionTypeNode = ast.UnionTypeNode +type ValidImportTypeNode = ast.ValidImportTypeNode +type VariableDeclaration = ast.VariableDeclaration +type VariableDeclarationList = ast.VariableDeclarationList +type VariableDeclarationListNode = ast.VariableDeclarationListNode +type VariableDeclarationNode = ast.VariableDeclarationNode +type VariableDeclarationNodeList = ast.VariableDeclarationNodeList +type VariableOrParameterDeclaration = ast.VariableOrParameterDeclaration +type VariableOrPropertyDeclaration = ast.VariableOrPropertyDeclaration +type VariableStatement = ast.VariableStatement +type Visitor = ast.Visitor +type VoidExpression = ast.VoidExpression +//go:linkname WalkUpBindingElementsAndPatterns github.com/microsoft/typescript-go/internal/ast.WalkUpBindingElementsAndPatterns +func WalkUpBindingElementsAndPatterns(binding *ast.Node) *ast.Node +//go:linkname WalkUpParenthesizedExpressions github.com/microsoft/typescript-go/internal/ast.WalkUpParenthesizedExpressions +func WalkUpParenthesizedExpressions(node *ast.Expression) *ast.Node +//go:linkname WalkUpParenthesizedTypes github.com/microsoft/typescript-go/internal/ast.WalkUpParenthesizedTypes +func WalkUpParenthesizedTypes(node *ast.TypeNode) *ast.Node +type WhileStatement = ast.WhileStatement +type WithStatement = ast.WithStatement +type YieldExpression = ast.YieldExpression diff --git a/shim/bundled/go.mod b/shim/bundled/go.mod new file mode 100644 index 0000000..76e02e6 --- /dev/null +++ b/shim/bundled/go.mod @@ -0,0 +1,12 @@ +module github.com/microsoft/typescript-go/shim/bundled + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect +) diff --git a/shim/bundled/go.sum b/shim/bundled/go.sum new file mode 100644 index 0000000..0e13f6e --- /dev/null +++ b/shim/bundled/go.sum @@ -0,0 +1,14 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/bundled/shim.go b/shim/bundled/shim.go new file mode 100644 index 0000000..63f3a05 --- /dev/null +++ b/shim/bundled/shim.go @@ -0,0 +1,19 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package bundled + +import "github.com/microsoft/typescript-go/internal/bundled" +import "github.com/microsoft/typescript-go/internal/vfs" +import _ "unsafe" + +const Embedded = bundled.Embedded +//go:linkname IsBundled github.com/microsoft/typescript-go/internal/bundled.IsBundled +func IsBundled(path string) bool +var LibNames = bundled.LibNames +//go:linkname LibPath github.com/microsoft/typescript-go/internal/bundled.LibPath +func LibPath() string +//go:linkname TestingLibPath github.com/microsoft/typescript-go/internal/bundled.TestingLibPath +func TestingLibPath() string +//go:linkname WrapFS github.com/microsoft/typescript-go/internal/bundled.WrapFS +func WrapFS(fs vfs.FS) vfs.FS diff --git a/shim/checker/extra-shim.json b/shim/checker/extra-shim.json new file mode 100644 index 0000000..b8a7dbf --- /dev/null +++ b/shim/checker/extra-shim.json @@ -0,0 +1,93 @@ +{ + "ExtraFunctions": [ + "isNonDeferredTypeReference", + "getMappedTypeModifiers" + ], + "ExtraMethods": { + "Checker": [ + "getBaseConstraintOfType", + "getDeclaredTypeOfSymbol", + "getBaseTypes", + "getSignaturesOfType", + "getApparentType", + "getIndexTypeOfType", + "getPropertyOfType", + "getPropertiesOfType", + "getSignaturesOfType", + "getPropertyNameForKnownSymbolName", + "getTypeFromTypeNode", + "getAccessedPropertyName", + "isArrayOrTupleType", + "isArrayType", + "getTypeArguments", + "getContextualType", + "getAwaitedType", + "getTypeOfSymbol", + "getTypeOfPropertyOfType", + "getReturnTypeOfSignature", + "getContextualTypeForArgumentAtIndex", + "getResolvedSignature", + "getBaseTypeOfLiteralType", + "getWidenedType", + "isTypeAssignableTo", + "isTypeIdenticalTo", + "IsDeprecatedDeclaration", + "GetShorthandAssignmentValueSymbol", + "getImmediateAliasedSymbol", + "getDeclarationOfAliasSymbol", + "getTypePredicateOfSignature", + "GetNonNullableType", + "IsNullableType", + "getIndexInfosOfType", + "isReadonlySymbol", + "getContextFreeTypeOfExpression" + ] + }, + "ExtraFields": { + "Type": [ + "alias", + "flags", + "symbol", + "objectFlags" + ], + "TupleType": [ + "combinedFlags", + "readonly" + ], + "Signature": [ + "parameters", + "declaration", + "resolvedTypePredicate", + "composite" + ], + "Checker": [ + "numberType", + "booleanType", + "globalRegExpType" + ], + "InterfaceType": [ + "thisType" + ], + "TypePredicate": [ + "kind", + "t", + "parameterIndex" + ], + "IndexedAccessType": [ + "objectType", + "indexType" + ], + "MappedType": [ + "typeParameter", + "constraintType", + "templateType" + ], + "ConditionalType": [ + "checkType", + "extendsType" + ], + "CompositeSignature": [ + "signatures" + ] + } +} diff --git a/shim/checkershim/go.mod b/shim/checker/go.mod similarity index 88% rename from shim/checkershim/go.mod rename to shim/checker/go.mod index a3bfd2e..2ac4ffb 100644 --- a/shim/checkershim/go.mod +++ b/shim/checker/go.mod @@ -1,4 +1,4 @@ -module github.com/microsoft/typescript-go/shim/checkershim +module github.com/microsoft/typescript-go/shim/checker go 1.26 diff --git a/shim/checkershim/go.sum b/shim/checker/go.sum similarity index 100% rename from shim/checkershim/go.sum rename to shim/checker/go.sum diff --git a/shim/checker/shim.go b/shim/checker/shim.go new file mode 100644 index 0000000..3767ad0 --- /dev/null +++ b/shim/checker/shim.go @@ -0,0 +1,1285 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package checker + +import "context" +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/checker" +import "github.com/microsoft/typescript-go/internal/collections" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/diagnostics" +import "github.com/microsoft/typescript-go/internal/evaluator" +import "github.com/microsoft/typescript-go/internal/jsnum" +import "github.com/microsoft/typescript-go/internal/nodebuilder" +import "github.com/microsoft/typescript-go/internal/printer" +import "github.com/microsoft/typescript-go/internal/scanner" +import "sync" +import "unsafe" + +type AccessFlags = checker.AccessFlags +const AccessFlagsAllowMissing = checker.AccessFlagsAllowMissing +const AccessFlagsCacheSymbol = checker.AccessFlagsCacheSymbol +const AccessFlagsContextual = checker.AccessFlagsContextual +const AccessFlagsExpressionPosition = checker.AccessFlagsExpressionPosition +const AccessFlagsIncludeUndefined = checker.AccessFlagsIncludeUndefined +const AccessFlagsNoIndexSignatures = checker.AccessFlagsNoIndexSignatures +const AccessFlagsNone = checker.AccessFlagsNone +const AccessFlagsPersistent = checker.AccessFlagsPersistent +const AccessFlagsReportDeprecated = checker.AccessFlagsReportDeprecated +const AccessFlagsSuppressNoImplicitAnyError = checker.AccessFlagsSuppressNoImplicitAnyError +const AccessFlagsWriting = checker.AccessFlagsWriting +type AliasSymbolLinks = checker.AliasSymbolLinks +type ArrayLiteralLinks = checker.ArrayLiteralLinks +type ArrayToSingleTypeMapper = checker.ArrayToSingleTypeMapper +type ArrayTypeMapper = checker.ArrayTypeMapper +type AssertionLinks = checker.AssertionLinks +type AssignmentKind = checker.AssignmentKind +const AssignmentKindCompound = checker.AssignmentKindCompound +const AssignmentKindDefinite = checker.AssignmentKindDefinite +const AssignmentKindNone = checker.AssignmentKindNone +type AssignmentReducedKey = checker.AssignmentReducedKey +type AssignmentTarget = checker.AssignmentTarget +type CacheHashKey = checker.CacheHashKey +type CachedSignatureKey = checker.CachedSignatureKey +type CachedTypeKey = checker.CachedTypeKey +type CachedTypeKind = checker.CachedTypeKind +const CachedTypeKindApparentType = checker.CachedTypeKindApparentType +const CachedTypeKindArrayLiteralType = checker.CachedTypeKindArrayLiteralType +const CachedTypeKindAwaitedType = checker.CachedTypeKindAwaitedType +const CachedTypeKindDecoratorContext = checker.CachedTypeKindDecoratorContext +const CachedTypeKindDecoratorContextPrivate = checker.CachedTypeKindDecoratorContextPrivate +const CachedTypeKindDecoratorContextPrivateStatic = checker.CachedTypeKindDecoratorContextPrivateStatic +const CachedTypeKindDecoratorContextStatic = checker.CachedTypeKindDecoratorContextStatic +const CachedTypeKindDefaultOnlyType = checker.CachedTypeKindDefaultOnlyType +const CachedTypeKindEquivalentBaseType = checker.CachedTypeKindEquivalentBaseType +const CachedTypeKindEvolvingArrayType = checker.CachedTypeKindEvolvingArrayType +const CachedTypeKindIndexType = checker.CachedTypeKindIndexType +const CachedTypeKindIndexedAccessForReading = checker.CachedTypeKindIndexedAccessForReading +const CachedTypeKindIndexedAccessForWriting = checker.CachedTypeKindIndexedAccessForWriting +const CachedTypeKindLiteralUnionBaseType = checker.CachedTypeKindLiteralUnionBaseType +const CachedTypeKindPermissiveInstantiation = checker.CachedTypeKindPermissiveInstantiation +const CachedTypeKindPromisedTypeOfPromise = checker.CachedTypeKindPromisedTypeOfPromise +const CachedTypeKindRegularObjectLiteral = checker.CachedTypeKindRegularObjectLiteral +const CachedTypeKindRestrictiveInstantiation = checker.CachedTypeKindRestrictiveInstantiation +const CachedTypeKindRestrictiveTypeParameter = checker.CachedTypeKindRestrictiveTypeParameter +const CachedTypeKindStringIndexType = checker.CachedTypeKindStringIndexType +const CachedTypeKindSyntheticType = checker.CachedTypeKindSyntheticType +const CachedTypeKindWidened = checker.CachedTypeKindWidened +type CallState = checker.CallState +type CheckMode = checker.CheckMode +const CheckModeContextual = checker.CheckModeContextual +const CheckModeForceTuple = checker.CheckModeForceTuple +const CheckModeInferential = checker.CheckModeInferential +const CheckModeIsForSignatureHelp = checker.CheckModeIsForSignatureHelp +const CheckModeNormal = checker.CheckModeNormal +const CheckModeRestBindingElement = checker.CheckModeRestBindingElement +const CheckModeSkipContextSensitive = checker.CheckModeSkipContextSensitive +const CheckModeSkipGenericFunctions = checker.CheckModeSkipGenericFunctions +const CheckModeTypeOnly = checker.CheckModeTypeOnly +type Checker = checker.Checker +//go:linkname Checker_getImmediateAliasedSymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).getImmediateAliasedSymbol +func Checker_getImmediateAliasedSymbol(recv *checker.Checker, symbol *ast.Symbol) *ast.Symbol +//go:linkname Checker_getContextFreeTypeOfExpression github.com/microsoft/typescript-go/internal/checker.(*Checker).getContextFreeTypeOfExpression +func Checker_getContextFreeTypeOfExpression(recv *checker.Checker, node *ast.Node) *checker.Type +//go:linkname Checker_getResolvedSignature github.com/microsoft/typescript-go/internal/checker.(*Checker).getResolvedSignature +func Checker_getResolvedSignature(recv *checker.Checker, node *ast.Node, candidatesOutArray *[]*checker.Signature, checkMode checker.CheckMode) *checker.Signature +//go:linkname Checker_isReadonlySymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).isReadonlySymbol +func Checker_isReadonlySymbol(recv *checker.Checker, symbol *ast.Symbol) bool +//go:linkname Checker_IsDeprecatedDeclaration github.com/microsoft/typescript-go/internal/checker.(*Checker).IsDeprecatedDeclaration +func Checker_IsDeprecatedDeclaration(recv *checker.Checker, declaration *ast.Node) bool +//go:linkname Checker_getDeclarationOfAliasSymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).getDeclarationOfAliasSymbol +func Checker_getDeclarationOfAliasSymbol(recv *checker.Checker, symbol *ast.Symbol) *ast.Node +//go:linkname Checker_getTypeOfSymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypeOfSymbol +func Checker_getTypeOfSymbol(recv *checker.Checker, symbol *ast.Symbol) *checker.Type +//go:linkname Checker_getWidenedType github.com/microsoft/typescript-go/internal/checker.(*Checker).getWidenedType +func Checker_getWidenedType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_GetNonNullableType github.com/microsoft/typescript-go/internal/checker.(*Checker).GetNonNullableType +func Checker_GetNonNullableType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_IsNullableType github.com/microsoft/typescript-go/internal/checker.(*Checker).IsNullableType +func Checker_IsNullableType(recv *checker.Checker, t *checker.Type) bool +//go:linkname Checker_getPropertiesOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getPropertiesOfType +func Checker_getPropertiesOfType(recv *checker.Checker, t *checker.Type) []*ast.Symbol +//go:linkname Checker_getPropertyOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getPropertyOfType +func Checker_getPropertyOfType(recv *checker.Checker, t *checker.Type, name string) *ast.Symbol +//go:linkname Checker_getTypeOfPropertyOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypeOfPropertyOfType +func Checker_getTypeOfPropertyOfType(recv *checker.Checker, t *checker.Type, name string) *checker.Type +//go:linkname Checker_getSignaturesOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getSignaturesOfType +func Checker_getSignaturesOfType(recv *checker.Checker, t *checker.Type, kind checker.SignatureKind) []*checker.Signature +//go:linkname Checker_getIndexInfosOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getIndexInfosOfType +func Checker_getIndexInfosOfType(recv *checker.Checker, t *checker.Type) []*checker.IndexInfo +//go:linkname Checker_getIndexTypeOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getIndexTypeOfType +func Checker_getIndexTypeOfType(recv *checker.Checker, t *checker.Type, keyType *checker.Type) *checker.Type +//go:linkname Checker_getBaseTypes github.com/microsoft/typescript-go/internal/checker.(*Checker).getBaseTypes +func Checker_getBaseTypes(recv *checker.Checker, t *checker.Type) []*checker.Type +//go:linkname Checker_getReturnTypeOfSignature github.com/microsoft/typescript-go/internal/checker.(*Checker).getReturnTypeOfSignature +func Checker_getReturnTypeOfSignature(recv *checker.Checker, sig *checker.Signature) *checker.Type +//go:linkname Checker_getApparentType github.com/microsoft/typescript-go/internal/checker.(*Checker).getApparentType +func Checker_getApparentType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_getTypeArguments github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypeArguments +func Checker_getTypeArguments(recv *checker.Checker, t *checker.Type) []*checker.Type +//go:linkname Checker_getTypeFromTypeNode github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypeFromTypeNode +func Checker_getTypeFromTypeNode(recv *checker.Checker, node *ast.Node) *checker.Type +//go:linkname Checker_isArrayType github.com/microsoft/typescript-go/internal/checker.(*Checker).isArrayType +func Checker_isArrayType(recv *checker.Checker, t *checker.Type) bool +//go:linkname Checker_isArrayOrTupleType github.com/microsoft/typescript-go/internal/checker.(*Checker).isArrayOrTupleType +func Checker_isArrayOrTupleType(recv *checker.Checker, t *checker.Type) bool +//go:linkname Checker_getDeclaredTypeOfSymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).getDeclaredTypeOfSymbol +func Checker_getDeclaredTypeOfSymbol(recv *checker.Checker, symbol *ast.Symbol) *checker.Type +//go:linkname Checker_getBaseTypeOfLiteralType github.com/microsoft/typescript-go/internal/checker.(*Checker).getBaseTypeOfLiteralType +func Checker_getBaseTypeOfLiteralType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_getBaseConstraintOfType github.com/microsoft/typescript-go/internal/checker.(*Checker).getBaseConstraintOfType +func Checker_getBaseConstraintOfType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_getContextualType github.com/microsoft/typescript-go/internal/checker.(*Checker).getContextualType +func Checker_getContextualType(recv *checker.Checker, node *ast.Node, contextFlags checker.ContextFlags) *checker.Type +//go:linkname Checker_getContextualTypeForArgumentAtIndex github.com/microsoft/typescript-go/internal/checker.(*Checker).getContextualTypeForArgumentAtIndex +func Checker_getContextualTypeForArgumentAtIndex(recv *checker.Checker, callTarget *ast.Node, argIndex int) *checker.Type +//go:linkname Checker_getAwaitedType github.com/microsoft/typescript-go/internal/checker.(*Checker).getAwaitedType +func Checker_getAwaitedType(recv *checker.Checker, t *checker.Type) *checker.Type +//go:linkname Checker_getAccessedPropertyName github.com/microsoft/typescript-go/internal/checker.(*Checker).getAccessedPropertyName +func Checker_getAccessedPropertyName(recv *checker.Checker, access *ast.Node) (string, bool) +//go:linkname Checker_getPropertyNameForKnownSymbolName github.com/microsoft/typescript-go/internal/checker.(*Checker).getPropertyNameForKnownSymbolName +func Checker_getPropertyNameForKnownSymbolName(recv *checker.Checker, symbolName string) string +//go:linkname Checker_isTypeIdenticalTo github.com/microsoft/typescript-go/internal/checker.(*Checker).isTypeIdenticalTo +func Checker_isTypeIdenticalTo(recv *checker.Checker, source *checker.Type, target *checker.Type) bool +//go:linkname Checker_isTypeAssignableTo github.com/microsoft/typescript-go/internal/checker.(*Checker).isTypeAssignableTo +func Checker_isTypeAssignableTo(recv *checker.Checker, source *checker.Type, target *checker.Type) bool +//go:linkname Checker_getTypePredicateOfSignature github.com/microsoft/typescript-go/internal/checker.(*Checker).getTypePredicateOfSignature +func Checker_getTypePredicateOfSignature(recv *checker.Checker, sig *checker.Signature) *checker.TypePredicate +//go:linkname Checker_GetShorthandAssignmentValueSymbol github.com/microsoft/typescript-go/internal/checker.(*Checker).GetShorthandAssignmentValueSymbol +func Checker_GetShorthandAssignmentValueSymbol(recv *checker.Checker, location *ast.Node) *ast.Symbol +type extra_Checker struct { + id uint32 + program checker.Program + compilerOptions *core.CompilerOptions + files []*ast.SourceFile + fileIndexMap map[*ast.SourceFile]int + compareSymbols func(*ast.Symbol, *ast.Symbol) int + compareSymbolChains func([]*ast.Symbol, []*ast.Symbol) int + TypeCount uint32 + SymbolCount uint32 + TotalInstantiationCount uint32 + instantiationCount uint32 + instantiationDepth uint32 + inlineLevel int + currentNode *ast.Node + varianceTypeParameter *checker.Type + languageVersion core.ScriptTarget + moduleKind core.ModuleKind + moduleResolutionKind core.ModuleResolutionKind + isInferencePartiallyBlocked bool + legacyDecorators bool + emitStandardClassFields bool + strictNullChecks bool + strictFunctionTypes bool + strictBindCallApply bool + strictPropertyInitialization bool + strictBuiltinIteratorReturn bool + noImplicitAny bool + noImplicitThis bool + useUnknownInCatchVariables bool + exactOptionalPropertyTypes bool + canCollectSymbolAliasAccessibilityData bool + wasCanceled bool + saveDeferredDiagnostics bool + arrayVariances []checker.VarianceFlags + globals ast.SymbolTable + evaluate evaluator.Evaluator + stringLiteralTypes map[string]*checker.Type + numberLiteralTypes map[jsnum.Number]*checker.Type + bigintLiteralTypes map[jsnum.PseudoBigInt]*checker.Type + enumLiteralTypes map[checker.EnumLiteralKey]*checker.Type + indexedAccessTypes map[checker.CacheHashKey]*checker.Type + templateLiteralTypes map[checker.CacheHashKey]*checker.Type + stringMappingTypes map[checker.StringMappingKey]*checker.Type + uniqueESSymbolTypes map[*ast.Symbol]*checker.Type + thisExpandoKinds map[*ast.Symbol]int32 + thisExpandoLocations map[*ast.Symbol]*ast.Node + subtypeReductionCache map[checker.CacheHashKey][]*checker.Type + cachedTypes map[checker.CachedTypeKey]*checker.Type + cachedSignatures map[checker.CachedSignatureKey]*checker.Signature + undefinedProperties map[string]*ast.Symbol + narrowedTypes map[checker.NarrowedTypeKey]*checker.Type + assignmentReducedTypes map[checker.AssignmentReducedKey]*checker.Type + discriminatedContextualTypes map[checker.DiscriminatedContextualTypeKey]*checker.Type + instantiationExpressionTypes map[checker.InstantiationExpressionKey]*checker.Type + substitutionTypes map[checker.SubstitutionTypeKey]*checker.Type + reverseMappedCache map[checker.ReverseMappedTypeKey]*checker.Type + reverseHomomorphicMappedCache map[checker.ReverseMappedTypeKey]*checker.Type + iterationTypesCache map[checker.IterationTypesKey]checker.IterationTypes + markerTypes collections.Set[*checker.Type] + undefinedSymbol *ast.Symbol + argumentsSymbol *ast.Symbol + requireSymbol *ast.Symbol + unknownSymbol *ast.Symbol + unresolvedSymbols map[string]*ast.Symbol + errorTypes map[checker.CacheHashKey]*checker.Type + moduleSymbols map[*ast.Node]*ast.Symbol + globalThisSymbol *ast.Symbol + resolveName func(location *ast.Node, name string, meaning ast.SymbolFlags, nameNotFoundMessage *diagnostics.Message, isUse bool, excludeGlobals bool) *ast.Symbol + resolveNameForSymbolSuggestion func(location *ast.Node, name string, meaning ast.SymbolFlags, nameNotFoundMessage *diagnostics.Message, isUse bool, excludeGlobals bool) *ast.Symbol + tupleTypes map[checker.CacheHashKey]*checker.Type + unionTypes map[checker.CacheHashKey]*checker.Type + unionOfUnionTypes map[checker.UnionOfUnionKey]*checker.Type + intersectionTypes map[checker.CacheHashKey]*checker.Type + propertiesTypes map[checker.PropertiesTypesKey]*checker.Type + diagnostics ast.DiagnosticsCollection + suggestionDiagnostics ast.DiagnosticsCollection + symbolPool core.Pool[ast.Symbol] + signaturePool core.Pool[checker.Signature] + indexInfoPool core.Pool[checker.IndexInfo] + mergedSymbols map[*ast.Symbol]*ast.Symbol + factory ast.NodeFactory + nodeLinks core.LinkStore[*ast.Node, checker.NodeLinks] + signatureLinks core.LinkStore[*ast.Node, checker.SignatureLinks] + symbolNodeLinks core.LinkStore[*ast.Node, checker.SymbolNodeLinks] + typeNodeLinks core.LinkStore[*ast.Node, checker.TypeNodeLinks] + enumMemberLinks core.LinkStore[*ast.Node, checker.EnumMemberLinks] + assertionLinks core.LinkStore[*ast.Node, checker.AssertionLinks] + arrayLiteralLinks core.LinkStore[*ast.Node, checker.ArrayLiteralLinks] + switchStatementLinks core.LinkStore[*ast.Node, checker.SwitchStatementLinks] + jsxElementLinks core.LinkStore[*ast.Node, checker.JsxElementLinks] + symbolReferenceLinks core.LinkStore[*ast.Symbol, checker.SymbolReferenceLinks] + valueSymbolLinks core.LinkStore[*ast.Symbol, checker.ValueSymbolLinks] + mappedSymbolLinks core.LinkStore[*ast.Symbol, checker.MappedSymbolLinks] + deferredSymbolLinks core.LinkStore[*ast.Symbol, checker.DeferredSymbolLinks] + aliasSymbolLinks core.LinkStore[*ast.Symbol, checker.AliasSymbolLinks] + moduleSymbolLinks core.LinkStore[*ast.Symbol, checker.ModuleSymbolLinks] + lateBoundLinks core.LinkStore[*ast.Symbol, checker.LateBoundLinks] + exportTypeLinks core.LinkStore[*ast.Symbol, checker.ExportTypeLinks] + membersAndExportsLinks core.LinkStore[*ast.Symbol, checker.MembersAndExportsLinks] + typeAliasLinks core.LinkStore[*ast.Symbol, checker.TypeAliasLinks] + declaredTypeLinks core.LinkStore[*ast.Symbol, checker.DeclaredTypeLinks] + spreadLinks core.LinkStore[*ast.Symbol, checker.SpreadLinks] + varianceLinks core.LinkStore[*ast.Symbol, checker.VarianceLinks] + ReverseMappedSymbolLinks core.LinkStore[*ast.Symbol, checker.ReverseMappedSymbolLinks] + markedAssignmentSymbolLinks core.LinkStore[*ast.Symbol, checker.MarkedAssignmentSymbolLinks] + symbolContainerLinks core.LinkStore[*ast.Symbol, checker.ContainingSymbolLinks] + sourceFileLinks core.LinkStore[*ast.SourceFile, checker.SourceFileLinks] + regExpScanner *scanner.Scanner + patternForType map[*checker.Type]*ast.Node + contextFreeTypes map[*ast.Node]*checker.Type + anyType *checker.Type + autoType *checker.Type + wildcardType *checker.Type + blockedStringType *checker.Type + errorType *checker.Type + unresolvedType *checker.Type + nonInferrableAnyType *checker.Type + intrinsicMarkerType *checker.Type + unknownType *checker.Type + undefinedType *checker.Type + undefinedWideningType *checker.Type + missingType *checker.Type + undefinedOrMissingType *checker.Type + optionalType *checker.Type + nullType *checker.Type + nullWideningType *checker.Type + stringType *checker.Type + numberType *checker.Type + bigintType *checker.Type + regularFalseType *checker.Type + falseType *checker.Type + regularTrueType *checker.Type + trueType *checker.Type + booleanType *checker.Type + esSymbolType *checker.Type + voidType *checker.Type + neverType *checker.Type + silentNeverType *checker.Type + implicitNeverType *checker.Type + unreachableNeverType *checker.Type + nonPrimitiveType *checker.Type + stringOrNumberType *checker.Type + stringNumberSymbolType *checker.Type + numberOrBigIntType *checker.Type + templateConstraintType *checker.Type + numericStringType *checker.Type + uniqueLiteralType *checker.Type + uniqueLiteralMapper *checker.TypeMapper + reliabilityFlags checker.RelationComparisonResult + reportUnreliableMapper *checker.TypeMapper + reportUnmeasurableMapper *checker.TypeMapper + restrictiveMapper *checker.TypeMapper + permissiveMapper *checker.TypeMapper + emptyObjectType *checker.Type + emptyJsxObjectType *checker.Type + emptyFreshJsxObjectType *checker.Type + emptyTypeLiteralType *checker.Type + unknownEmptyObjectType *checker.Type + unknownUnionType *checker.Type + emptyGenericType *checker.Type + anyFunctionType *checker.Type + noConstraintType *checker.Type + circularConstraintType *checker.Type + resolvingDefaultType *checker.Type + markerSuperType *checker.Type + markerSubType *checker.Type + markerOtherType *checker.Type + markerSuperTypeForCheck *checker.Type + markerSubTypeForCheck *checker.Type + noTypePredicate *checker.TypePredicate + anySignature *checker.Signature + unknownSignature *checker.Signature + resolvingSignature *checker.Signature + silentNeverSignature *checker.Signature + cachedArgumentsReferenced map[*ast.Node]bool + enumNumberIndexInfo *checker.IndexInfo + anyBaseTypeIndexInfo *checker.IndexInfo + patternAmbientModules []*ast.PatternAmbientModule + patternAmbientModuleAugmentations ast.SymbolTable + globalObjectType *checker.Type + globalFunctionType *checker.Type + globalCallableFunctionType *checker.Type + globalNewableFunctionType *checker.Type + globalArrayType *checker.Type + globalReadonlyArrayType *checker.Type + globalStringType *checker.Type + globalNumberType *checker.Type + globalBooleanType *checker.Type + globalRegExpType *checker.Type + globalThisType *checker.Type + anyArrayType *checker.Type + autoArrayType *checker.Type + anyReadonlyArrayType *checker.Type + deferredGlobalImportMetaExpressionType *checker.Type + contextualBindingPatterns []*ast.Node + emptyStringType *checker.Type + zeroType *checker.Type + zeroBigIntType *checker.Type + typeofType *checker.Type + typeResolutions []checker.TypeResolution + resolutionStart int + inVarianceComputation bool + apparentArgumentCount *int + lastGetCombinedNodeFlagsNode *ast.Node + lastGetCombinedNodeFlagsResult ast.NodeFlags + lastGetCombinedModifierFlagsNode *ast.Node + lastGetCombinedModifierFlagsResult ast.ModifierFlags + freeinferenceState *checker.InferenceState + freeFlowState *checker.FlowState + flowLoopCache map[checker.FlowLoopKey]*checker.Type + flowLoopStack []checker.FlowLoopInfo + sharedFlows []checker.SharedFlow + antecedentTypes []*checker.Type + flowAnalysisDisabled bool + flowInvocationCount int + flowTypeCache map[*ast.Node]*checker.Type + lastFlowNode *ast.FlowNode + lastFlowNodeReachable bool + flowNodeReachable map[*ast.FlowNode]bool + flowNodePostSuper map[*ast.FlowNode]bool + renamedBindingElementsInTypes []*ast.Node + contextualInfos []checker.ContextualInfo + inferenceContextInfos []checker.InferenceContextInfo + awaitedTypeStack []*checker.Type + reverseMappedSourceStack []*checker.Type + reverseMappedTargetStack []*checker.Type + reverseExpandingFlags checker.ExpandingFlags + freeRelater *checker.Relater + subtypeRelation *checker.Relation + strictSubtypeRelation *checker.Relation + assignableRelation *checker.Relation + comparableRelation *checker.Relation + identityRelation *checker.Relation + enumRelation map[checker.EnumRelationKey]checker.RelationComparisonResult + getGlobalESSymbolType func() *checker.Type + getGlobalBigIntType func() *checker.Type + getGlobalImportMetaType func() *checker.Type + getGlobalImportAttributesType func() *checker.Type + getGlobalImportAttributesTypeChecked func() *checker.Type + getGlobalNonNullableTypeAliasOrNil func() *ast.Symbol + getGlobalExtractSymbol func() *ast.Symbol + getGlobalDisposableType func() *checker.Type + getGlobalAsyncDisposableType func() *checker.Type + getGlobalAwaitedSymbol func() *ast.Symbol + getGlobalAwaitedSymbolOrNil func() *ast.Symbol + getGlobalNaNSymbolOrNil func() *ast.Symbol + getGlobalRecordSymbol func() *ast.Symbol + getGlobalTemplateStringsArrayType func() *checker.Type + getGlobalESSymbolConstructorSymbolOrNil func() *ast.Symbol + getGlobalESSymbolConstructorTypeSymbolOrNil func() *ast.Symbol + getGlobalImportCallOptionsType func() *checker.Type + getGlobalImportCallOptionsTypeChecked func() *checker.Type + getGlobalPromiseType func() *checker.Type + getGlobalPromiseTypeChecked func() *checker.Type + getGlobalPromiseLikeType func() *checker.Type + getGlobalPromiseConstructorSymbol func() *ast.Symbol + getGlobalPromiseConstructorSymbolOrNil func() *ast.Symbol + getGlobalOmitSymbol func() *ast.Symbol + getGlobalNoInferSymbolOrNil func() *ast.Symbol + getGlobalIteratorType func() *checker.Type + getGlobalIterableType func() *checker.Type + getGlobalIterableTypeChecked func() *checker.Type + getGlobalIterableIteratorType func() *checker.Type + getGlobalIterableIteratorTypeChecked func() *checker.Type + getGlobalIteratorObjectType func() *checker.Type + getGlobalGeneratorType func() *checker.Type + getGlobalAsyncIteratorType func() *checker.Type + getGlobalAsyncIterableType func() *checker.Type + getGlobalAsyncIterableTypeChecked func() *checker.Type + getGlobalAsyncIterableIteratorType func() *checker.Type + getGlobalAsyncIterableIteratorTypeChecked func() *checker.Type + getGlobalAsyncIteratorObjectType func() *checker.Type + getGlobalAsyncGeneratorType func() *checker.Type + getGlobalIteratorYieldResultType func() *checker.Type + getGlobalIteratorReturnResultType func() *checker.Type + getGlobalTypedPropertyDescriptorType func() *checker.Type + getGlobalClassDecoratorContextType func() *checker.Type + getGlobalClassMethodDecoratorContextType func() *checker.Type + getGlobalClassGetterDecoratorContextType func() *checker.Type + getGlobalClassSetterDecoratorContextType func() *checker.Type + getGlobalClassAccessorDecoratorContxtType func() *checker.Type + getGlobalClassAccessorDecoratorContextType func() *checker.Type + getGlobalClassAccessorDecoratorTargetType func() *checker.Type + getGlobalClassAccessorDecoratorResultType func() *checker.Type + getGlobalClassFieldDecoratorContextType func() *checker.Type + syncIterationTypesResolver *checker.IterationTypesResolver + asyncIterationTypesResolver *checker.IterationTypesResolver + isPrimitiveOrObjectOrEmptyType func(*checker.Type) bool + containsMissingType func(*checker.Type) bool + couldContainTypeVariables func(*checker.Type) bool + isStringIndexSignatureOnlyType func(*checker.Type) bool + markNodeAssignments func(*ast.Node) bool + compareTypesAssignable checker.TypeComparer + emitResolver *checker.EmitResolver + emitResolverOnce sync.Once + _jsxNamespace string + _jsxFactoryEntity *ast.Node + skipDirectInferenceNodes collections.Set[*ast.Node] + ctx context.Context + packagesMap map[string]bool + activeMappers []*checker.TypeMapper + activeTypeMappersCaches []map[checker.CacheHashKey]*checker.Type + ambientModulesOnce sync.Once + ambientModules []*ast.Symbol + withinUnreachableCode bool + reportedUnreachableNodes collections.Set[*ast.Node] + nonExistentProperties collections.Set[checker.NonExistentPropertyKey] + deferredDiagnosticCallbacks []func() + mu sync.Mutex +} +func Checker_numberType(v *checker.Checker) *checker.Type { + return ((*extra_Checker)(unsafe.Pointer(v))).numberType +} +func Checker_booleanType(v *checker.Checker) *checker.Type { + return ((*extra_Checker)(unsafe.Pointer(v))).booleanType +} +func Checker_globalRegExpType(v *checker.Checker) *checker.Type { + return ((*extra_Checker)(unsafe.Pointer(v))).globalRegExpType +} +//go:linkname CompareTypes github.com/microsoft/typescript-go/internal/checker.CompareTypes +func CompareTypes(t1 *checker.Type, t2 *checker.Type) int +type CompositeSignature = checker.CompositeSignature +type extra_CompositeSignature struct { + isUnion bool + signatures []*checker.Signature +} +func CompositeSignature_signatures(v *checker.CompositeSignature) []*checker.Signature { + return ((*extra_CompositeSignature)(unsafe.Pointer(v))).signatures +} +type CompositeSymbolIdentity = checker.CompositeSymbolIdentity +type CompositeTypeCacheIdentity = checker.CompositeTypeCacheIdentity +type CompositeTypeMapper = checker.CompositeTypeMapper +type ConditionalRoot = checker.ConditionalRoot +type ConditionalType = checker.ConditionalType +type extra_ConditionalType struct { + checker.ConstrainedType + root *checker.ConditionalRoot + checkType *checker.Type + extendsType *checker.Type + resolvedTrueType *checker.Type + resolvedFalseType *checker.Type + resolvedInferredTrueType *checker.Type + resolvedDefaultConstraint *checker.Type + resolvedConstraintOfDistributive *checker.Type + mapper *checker.TypeMapper + combinedMapper *checker.TypeMapper +} +func ConditionalType_checkType(v *checker.ConditionalType) *checker.Type { + return ((*extra_ConditionalType)(unsafe.Pointer(v))).checkType +} +func ConditionalType_extendsType(v *checker.ConditionalType) *checker.Type { + return ((*extra_ConditionalType)(unsafe.Pointer(v))).extendsType +} +type ConstrainedType = checker.ConstrainedType +type ContainingSymbolLinks = checker.ContainingSymbolLinks +type ContextFlags = checker.ContextFlags +const ContextFlagsIgnoreNodeInferences = checker.ContextFlagsIgnoreNodeInferences +const ContextFlagsNoConstraints = checker.ContextFlagsNoConstraints +const ContextFlagsNone = checker.ContextFlagsNone +const ContextFlagsSignature = checker.ContextFlagsSignature +const ContextFlagsSkipBindingPatterns = checker.ContextFlagsSkipBindingPatterns +type ContextualInfo = checker.ContextualInfo +//go:linkname CreateModeMismatchDetails github.com/microsoft/typescript-go/internal/checker.CreateModeMismatchDetails +func CreateModeMismatchDetails(program checker.Program, file *ast.SourceFile) checker.DiagnosticDetails +//go:linkname CreateModuleNotFoundChain github.com/microsoft/typescript-go/internal/checker.CreateModuleNotFoundChain +func CreateModuleNotFoundChain(program checker.Program, file *ast.SourceFile, moduleReference string, mode core.ResolutionMode, packageName string) checker.DiagnosticDetails +type DeclarationFileLinks = checker.DeclarationFileLinks +type DeclarationLinks = checker.DeclarationLinks +type DeclarationMeaning = checker.DeclarationMeaning +const DeclarationMeaningGetAccessor = checker.DeclarationMeaningGetAccessor +const DeclarationMeaningGetOrSetAccessor = checker.DeclarationMeaningGetOrSetAccessor +const DeclarationMeaningMethod = checker.DeclarationMeaningMethod +const DeclarationMeaningPrivateStatic = checker.DeclarationMeaningPrivateStatic +const DeclarationMeaningPropertyAssignment = checker.DeclarationMeaningPropertyAssignment +const DeclarationMeaningPropertyAssignmentOrMethod = checker.DeclarationMeaningPropertyAssignmentOrMethod +const DeclarationMeaningSetAccessor = checker.DeclarationMeaningSetAccessor +type DeclarationSpaces = checker.DeclarationSpaces +const DeclarationSpacesExportNamespace = checker.DeclarationSpacesExportNamespace +const DeclarationSpacesExportType = checker.DeclarationSpacesExportType +const DeclarationSpacesExportValue = checker.DeclarationSpacesExportValue +const DeclarationSpacesNone = checker.DeclarationSpacesNone +type DeclaredTypeLinks = checker.DeclaredTypeLinks +type DeferredSymbolLinks = checker.DeferredSymbolLinks +type DeferredTypeMapper = checker.DeferredTypeMapper +type DiagnosticAndArguments = checker.DiagnosticAndArguments +type DiagnosticDetails = checker.DiagnosticDetails +type DiscriminatedContextualTypeKey = checker.DiscriminatedContextualTypeKey +type Discriminator = checker.Discriminator +type ElementFlags = checker.ElementFlags +const ElementFlagsFixed = checker.ElementFlagsFixed +const ElementFlagsNonRequired = checker.ElementFlagsNonRequired +const ElementFlagsNonRest = checker.ElementFlagsNonRest +const ElementFlagsNone = checker.ElementFlagsNone +const ElementFlagsOptional = checker.ElementFlagsOptional +const ElementFlagsRequired = checker.ElementFlagsRequired +const ElementFlagsRest = checker.ElementFlagsRest +const ElementFlagsVariable = checker.ElementFlagsVariable +const ElementFlagsVariadic = checker.ElementFlagsVariadic +type EmitResolver = checker.EmitResolver +type EnumLiteralKey = checker.EnumLiteralKey +type EnumMemberLinks = checker.EnumMemberLinks +type EnumRelationKey = checker.EnumRelationKey +type ErrorChain = checker.ErrorChain +type ErrorOutputContainer = checker.ErrorOutputContainer +type ErrorReporter = checker.ErrorReporter +type EvolvingArrayType = checker.EvolvingArrayType +type ExhaustiveState = checker.ExhaustiveState +const ExhaustiveStateComputing = checker.ExhaustiveStateComputing +const ExhaustiveStateFalse = checker.ExhaustiveStateFalse +const ExhaustiveStateTrue = checker.ExhaustiveStateTrue +const ExhaustiveStateUnknown = checker.ExhaustiveStateUnknown +type ExpandingFlags = checker.ExpandingFlags +const ExpandingFlagsBoth = checker.ExpandingFlagsBoth +const ExpandingFlagsNone = checker.ExpandingFlagsNone +const ExpandingFlagsSource = checker.ExpandingFlagsSource +const ExpandingFlagsTarget = checker.ExpandingFlagsTarget +type ExportCollision = checker.ExportCollision +type ExportCollisionTable = checker.ExportCollisionTable +type ExportTypeLinks = checker.ExportTypeLinks +type FeatureMapEntry = checker.FeatureMapEntry +type FlowLoopInfo = checker.FlowLoopInfo +type FlowLoopKey = checker.FlowLoopKey +type FlowState = checker.FlowState +type FlowType = checker.FlowType +type FunctionTypeMapper = checker.FunctionTypeMapper +//go:linkname GetDeclarationModifierFlagsFromSymbol github.com/microsoft/typescript-go/internal/checker.GetDeclarationModifierFlagsFromSymbol +func GetDeclarationModifierFlagsFromSymbol(s *ast.Symbol) ast.ModifierFlags +//go:linkname GetResolvedSignatureForSignatureHelp github.com/microsoft/typescript-go/internal/checker.GetResolvedSignatureForSignatureHelp +func GetResolvedSignatureForSignatureHelp(node *ast.Node, argumentCount int, c *checker.Checker) (*checker.Signature, []*checker.Signature) +//go:linkname GetSingleVariableOfVariableStatement github.com/microsoft/typescript-go/internal/checker.GetSingleVariableOfVariableStatement +func GetSingleVariableOfVariableStatement(node *ast.Node) *ast.Node +type Host = checker.Host +type IndexFlags = checker.IndexFlags +const IndexFlagsNoIndexSignatures = checker.IndexFlagsNoIndexSignatures +const IndexFlagsNoReducibleCheck = checker.IndexFlagsNoReducibleCheck +const IndexFlagsNone = checker.IndexFlagsNone +const IndexFlagsStringsOnly = checker.IndexFlagsStringsOnly +type IndexInfo = checker.IndexInfo +type IndexType = checker.IndexType +type IndexedAccessType = checker.IndexedAccessType +type extra_IndexedAccessType struct { + checker.ConstrainedType + objectType *checker.Type + indexType *checker.Type + accessFlags checker.AccessFlags +} +func IndexedAccessType_objectType(v *checker.IndexedAccessType) *checker.Type { + return ((*extra_IndexedAccessType)(unsafe.Pointer(v))).objectType +} +func IndexedAccessType_indexType(v *checker.IndexedAccessType) *checker.Type { + return ((*extra_IndexedAccessType)(unsafe.Pointer(v))).indexType +} +type InferenceContext = checker.InferenceContext +type InferenceContextInfo = checker.InferenceContextInfo +type InferenceFlags = checker.InferenceFlags +const InferenceFlagsAnyDefault = checker.InferenceFlagsAnyDefault +const InferenceFlagsNoDefault = checker.InferenceFlagsNoDefault +const InferenceFlagsNone = checker.InferenceFlagsNone +const InferenceFlagsSkippedGenericFunction = checker.InferenceFlagsSkippedGenericFunction +type InferenceInfo = checker.InferenceInfo +type InferenceKey = checker.InferenceKey +type InferencePriority = checker.InferencePriority +const InferencePriorityAlwaysStrict = checker.InferencePriorityAlwaysStrict +const InferencePriorityCircularity = checker.InferencePriorityCircularity +const InferencePriorityContravariantConditional = checker.InferencePriorityContravariantConditional +const InferencePriorityHomomorphicMappedType = checker.InferencePriorityHomomorphicMappedType +const InferencePriorityLiteralKeyof = checker.InferencePriorityLiteralKeyof +const InferencePriorityMappedTypeConstraint = checker.InferencePriorityMappedTypeConstraint +const InferencePriorityMaxValue = checker.InferencePriorityMaxValue +const InferencePriorityNakedTypeVariable = checker.InferencePriorityNakedTypeVariable +const InferencePriorityNoConstraints = checker.InferencePriorityNoConstraints +const InferencePriorityNone = checker.InferencePriorityNone +const InferencePriorityPartialHomomorphicMappedType = checker.InferencePriorityPartialHomomorphicMappedType +const InferencePriorityPriorityImpliesCombination = checker.InferencePriorityPriorityImpliesCombination +const InferencePriorityReturnType = checker.InferencePriorityReturnType +const InferencePrioritySpeculativeTuple = checker.InferencePrioritySpeculativeTuple +const InferencePrioritySubstituteSource = checker.InferencePrioritySubstituteSource +type InferenceState = checker.InferenceState +type InferenceTypeMapper = checker.InferenceTypeMapper +type InheritanceInfo = checker.InheritanceInfo +type InstantiationExpressionKey = checker.InstantiationExpressionKey +type InstantiationExpressionType = checker.InstantiationExpressionType +type InterfaceType = checker.InterfaceType +type extra_InterfaceType struct { + checker.TypeReference + allTypeParameters []*checker.Type + outerTypeParameterCount int + thisType *checker.Type + baseTypesResolved bool + declaredMembersResolved bool + resolvedBaseConstructorType *checker.Type + resolvedBaseTypes []*checker.Type + declaredMembers ast.SymbolTable + declaredCallSignatures []*checker.Signature + declaredConstructSignatures []*checker.Signature + declaredIndexInfos []*checker.IndexInfo +} +func InterfaceType_thisType(v *checker.InterfaceType) *checker.Type { + return ((*extra_InterfaceType)(unsafe.Pointer(v))).thisType +} +type IntersectionFlags = checker.IntersectionFlags +const IntersectionFlagsNoConstraintReduction = checker.IntersectionFlagsNoConstraintReduction +const IntersectionFlagsNoSupertypeReduction = checker.IntersectionFlagsNoSupertypeReduction +const IntersectionFlagsNone = checker.IntersectionFlagsNone +type IntersectionState = checker.IntersectionState +const IntersectionStateNone = checker.IntersectionStateNone +const IntersectionStateSource = checker.IntersectionStateSource +const IntersectionStateTarget = checker.IntersectionStateTarget +type IntersectionType = checker.IntersectionType +type IntraExpressionInferenceSite = checker.IntraExpressionInferenceSite +type IntrinsicType = checker.IntrinsicType +type IntrinsicTypeKind = checker.IntrinsicTypeKind +const IntrinsicTypeKindCapitalize = checker.IntrinsicTypeKindCapitalize +const IntrinsicTypeKindLowercase = checker.IntrinsicTypeKindLowercase +const IntrinsicTypeKindNoInfer = checker.IntrinsicTypeKindNoInfer +const IntrinsicTypeKindUncapitalize = checker.IntrinsicTypeKindUncapitalize +const IntrinsicTypeKindUnknown = checker.IntrinsicTypeKindUnknown +const IntrinsicTypeKindUppercase = checker.IntrinsicTypeKindUppercase +//go:linkname IsExternalModuleSymbol github.com/microsoft/typescript-go/internal/checker.IsExternalModuleSymbol +func IsExternalModuleSymbol(moduleSymbol *ast.Symbol) bool +//go:linkname IsInTypeQuery github.com/microsoft/typescript-go/internal/checker.IsInTypeQuery +func IsInTypeQuery(node *ast.Node) bool +//go:linkname IsKnownSymbol github.com/microsoft/typescript-go/internal/checker.IsKnownSymbol +func IsKnownSymbol(symbol *ast.Symbol) bool +//go:linkname IsPrivateIdentifierSymbol github.com/microsoft/typescript-go/internal/checker.IsPrivateIdentifierSymbol +func IsPrivateIdentifierSymbol(symbol *ast.Symbol) bool +//go:linkname IsTupleType github.com/microsoft/typescript-go/internal/checker.IsTupleType +func IsTupleType(t *checker.Type) bool +//go:linkname IsTypeAny github.com/microsoft/typescript-go/internal/checker.IsTypeAny +func IsTypeAny(t *checker.Type) bool +type IterationTypeKind = checker.IterationTypeKind +const IterationTypeKindNext = checker.IterationTypeKindNext +const IterationTypeKindReturn = checker.IterationTypeKindReturn +const IterationTypeKindYield = checker.IterationTypeKindYield +type IterationTypes = checker.IterationTypes +type IterationTypesKey = checker.IterationTypesKey +type IterationTypesResolver = checker.IterationTypesResolver +type IterationUse = checker.IterationUse +const IterationUseAllowsAsyncIterablesFlag = checker.IterationUseAllowsAsyncIterablesFlag +const IterationUseAllowsStringInputFlag = checker.IterationUseAllowsStringInputFlag +const IterationUseAllowsSyncIterablesFlag = checker.IterationUseAllowsSyncIterablesFlag +const IterationUseAsyncGeneratorReturnType = checker.IterationUseAsyncGeneratorReturnType +const IterationUseAsyncYieldStar = checker.IterationUseAsyncYieldStar +const IterationUseCacheFlags = checker.IterationUseCacheFlags +const IterationUseDestructuring = checker.IterationUseDestructuring +const IterationUseDestructuringFlag = checker.IterationUseDestructuringFlag +const IterationUseElement = checker.IterationUseElement +const IterationUseForAwaitOf = checker.IterationUseForAwaitOf +const IterationUseForOf = checker.IterationUseForOf +const IterationUseForOfFlag = checker.IterationUseForOfFlag +const IterationUseGeneratorReturnType = checker.IterationUseGeneratorReturnType +const IterationUsePossiblyOutOfBounds = checker.IterationUsePossiblyOutOfBounds +const IterationUseSpread = checker.IterationUseSpread +const IterationUseSpreadFlag = checker.IterationUseSpreadFlag +const IterationUseYieldStar = checker.IterationUseYieldStar +const IterationUseYieldStarFlag = checker.IterationUseYieldStarFlag +type JSXLinks = checker.JSXLinks +type JsxElaborationElement = checker.JsxElaborationElement +type JsxElementLinks = checker.JsxElementLinks +type JsxFlags = checker.JsxFlags +const JsxFlagsIntrinsicElement = checker.JsxFlagsIntrinsicElement +const JsxFlagsIntrinsicIndexedElement = checker.JsxFlagsIntrinsicIndexedElement +const JsxFlagsIntrinsicNamedElement = checker.JsxFlagsIntrinsicNamedElement +const JsxFlagsNone = checker.JsxFlagsNone +var JsxNames = checker.JsxNames +type JsxReferenceKind = checker.JsxReferenceKind +const JsxReferenceKindComponent = checker.JsxReferenceKindComponent +const JsxReferenceKindFunction = checker.JsxReferenceKindFunction +const JsxReferenceKindMixed = checker.JsxReferenceKindMixed +var LanguageFeatureMinimumTarget = checker.LanguageFeatureMinimumTarget +type LanguageFeatureMinimumTargetMap = checker.LanguageFeatureMinimumTargetMap +type LateBoundLinks = checker.LateBoundLinks +type LiteralType = checker.LiteralType +const MAX_REVERSE_MAPPED_NESTING_INSPECTION_DEPTH = checker.MAX_REVERSE_MAPPED_NESTING_INSPECTION_DEPTH +type MappedSymbolLinks = checker.MappedSymbolLinks +type MappedType = checker.MappedType +type extra_MappedType struct { + checker.ObjectType + declaration *ast.MappedTypeNode + typeParameter *checker.Type + constraintType *checker.Type + nameType *checker.Type + templateType *checker.Type + modifiersType *checker.Type + resolvedApparentType *checker.Type + containsError bool +} +func MappedType_typeParameter(v *checker.MappedType) *checker.Type { + return ((*extra_MappedType)(unsafe.Pointer(v))).typeParameter +} +func MappedType_constraintType(v *checker.MappedType) *checker.Type { + return ((*extra_MappedType)(unsafe.Pointer(v))).constraintType +} +func MappedType_templateType(v *checker.MappedType) *checker.Type { + return ((*extra_MappedType)(unsafe.Pointer(v))).templateType +} +type MappedTypeModifiers = checker.MappedTypeModifiers +const MappedTypeModifiersExcludeOptional = checker.MappedTypeModifiersExcludeOptional +const MappedTypeModifiersExcludeReadonly = checker.MappedTypeModifiersExcludeReadonly +const MappedTypeModifiersIncludeOptional = checker.MappedTypeModifiersIncludeOptional +const MappedTypeModifiersIncludeReadonly = checker.MappedTypeModifiersIncludeReadonly +type MappedTypeNameTypeKind = checker.MappedTypeNameTypeKind +const MappedTypeNameTypeKindFiltering = checker.MappedTypeNameTypeKindFiltering +const MappedTypeNameTypeKindNone = checker.MappedTypeNameTypeKindNone +const MappedTypeNameTypeKindRemapping = checker.MappedTypeNameTypeKindRemapping +type MarkedAssignmentSymbolLinks = checker.MarkedAssignmentSymbolLinks +type MembersAndExportsLinks = checker.MembersAndExportsLinks +type MembersOrExportsResolutionKind = checker.MembersOrExportsResolutionKind +const MembersOrExportsResolutionKindResolvedExports = checker.MembersOrExportsResolutionKindResolvedExports +const MembersOrExportsResolutionKindResolvedMembers = checker.MembersOrExportsResolutionKindResolvedMembers +type MergedTypeMapper = checker.MergedTypeMapper +type MinArgumentCountFlags = checker.MinArgumentCountFlags +const MinArgumentCountFlagsNone = checker.MinArgumentCountFlagsNone +const MinArgumentCountFlagsStrongArityForUntypedJS = checker.MinArgumentCountFlagsStrongArityForUntypedJS +const MinArgumentCountFlagsVoidIsNonOptional = checker.MinArgumentCountFlagsVoidIsNonOptional +type ModuleSymbolLinks = checker.ModuleSymbolLinks +type NarrowedTypeKey = checker.NarrowedTypeKey +//go:linkname NewChecker github.com/microsoft/typescript-go/internal/checker.NewChecker +func NewChecker(program checker.Program) (*checker.Checker, *sync.Mutex) +//go:linkname NewDiagnosticChainForNode github.com/microsoft/typescript-go/internal/checker.NewDiagnosticChainForNode +func NewDiagnosticChainForNode(chain *ast.Diagnostic, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname NewDiagnosticForNode github.com/microsoft/typescript-go/internal/checker.NewDiagnosticForNode +func NewDiagnosticForNode(node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname NewNodeBuilder github.com/microsoft/typescript-go/internal/checker.NewNodeBuilder +func NewNodeBuilder(ch *checker.Checker, e *printer.EmitContext) *checker.NodeBuilder +//go:linkname NewNodeBuilderEx github.com/microsoft/typescript-go/internal/checker.NewNodeBuilderEx +func NewNodeBuilderEx(ch *checker.Checker, e *printer.EmitContext, idToSymbol map[*ast.IdentifierNode]*ast.Symbol) *checker.NodeBuilder +//go:linkname NewSymbolTrackerImpl github.com/microsoft/typescript-go/internal/checker.NewSymbolTrackerImpl +func NewSymbolTrackerImpl(context *checker.NodeBuilderContext, tracker nodebuilder.SymbolTracker) *checker.SymbolTrackerImpl +type NodeBuilder = checker.NodeBuilder +type NodeBuilderContext = checker.NodeBuilderContext +type NodeBuilderImpl = checker.NodeBuilderImpl +type NodeBuilderLinks = checker.NodeBuilderLinks +type NodeBuilderSymbolLinks = checker.NodeBuilderSymbolLinks +type NodeCheckFlags = checker.NodeCheckFlags +const NodeCheckFlagsAssignmentsMarked = checker.NodeCheckFlagsAssignmentsMarked +const NodeCheckFlagsContextChecked = checker.NodeCheckFlagsContextChecked +const NodeCheckFlagsEnumValuesComputed = checker.NodeCheckFlagsEnumValuesComputed +const NodeCheckFlagsInCheckIdentifier = checker.NodeCheckFlagsInCheckIdentifier +const NodeCheckFlagsInitializerIsUndefined = checker.NodeCheckFlagsInitializerIsUndefined +const NodeCheckFlagsInitializerIsUndefinedComputed = checker.NodeCheckFlagsInitializerIsUndefinedComputed +const NodeCheckFlagsNone = checker.NodeCheckFlagsNone +const NodeCheckFlagsTypeChecked = checker.NodeCheckFlagsTypeChecked +type NodeLinks = checker.NodeLinks +type NonExistentPropertyKey = checker.NonExistentPropertyKey +type ObjectFlags = checker.ObjectFlags +const ObjectFlagsAnonymous = checker.ObjectFlagsAnonymous +const ObjectFlagsArrayLiteral = checker.ObjectFlagsArrayLiteral +const ObjectFlagsClass = checker.ObjectFlagsClass +const ObjectFlagsClassOrInterface = checker.ObjectFlagsClassOrInterface +const ObjectFlagsContainsIntersections = checker.ObjectFlagsContainsIntersections +const ObjectFlagsContainsObjectOrArrayLiteral = checker.ObjectFlagsContainsObjectOrArrayLiteral +const ObjectFlagsContainsSpread = checker.ObjectFlagsContainsSpread +const ObjectFlagsContainsWideningType = checker.ObjectFlagsContainsWideningType +const ObjectFlagsCouldContainTypeVariables = checker.ObjectFlagsCouldContainTypeVariables +const ObjectFlagsCouldContainTypeVariablesComputed = checker.ObjectFlagsCouldContainTypeVariablesComputed +const ObjectFlagsEvolvingArray = checker.ObjectFlagsEvolvingArray +const ObjectFlagsFreshLiteral = checker.ObjectFlagsFreshLiteral +const ObjectFlagsIdenticalBaseTypeCalculated = checker.ObjectFlagsIdenticalBaseTypeCalculated +const ObjectFlagsIdenticalBaseTypeExists = checker.ObjectFlagsIdenticalBaseTypeExists +const ObjectFlagsInstantiated = checker.ObjectFlagsInstantiated +const ObjectFlagsInstantiatedMapped = checker.ObjectFlagsInstantiatedMapped +const ObjectFlagsInstantiationExpressionType = checker.ObjectFlagsInstantiationExpressionType +const ObjectFlagsInterface = checker.ObjectFlagsInterface +const ObjectFlagsIsClassInstanceClone = checker.ObjectFlagsIsClassInstanceClone +const ObjectFlagsIsConstrainedTypeVariable = checker.ObjectFlagsIsConstrainedTypeVariable +const ObjectFlagsIsGenericIndexType = checker.ObjectFlagsIsGenericIndexType +const ObjectFlagsIsGenericObjectType = checker.ObjectFlagsIsGenericObjectType +const ObjectFlagsIsGenericType = checker.ObjectFlagsIsGenericType +const ObjectFlagsIsGenericTypeComputed = checker.ObjectFlagsIsGenericTypeComputed +const ObjectFlagsIsNeverIntersection = checker.ObjectFlagsIsNeverIntersection +const ObjectFlagsIsNeverIntersectionComputed = checker.ObjectFlagsIsNeverIntersectionComputed +const ObjectFlagsIsUnknownLikeUnion = checker.ObjectFlagsIsUnknownLikeUnion +const ObjectFlagsIsUnknownLikeUnionComputed = checker.ObjectFlagsIsUnknownLikeUnionComputed +const ObjectFlagsJSLiteral = checker.ObjectFlagsJSLiteral +const ObjectFlagsJsxAttributes = checker.ObjectFlagsJsxAttributes +const ObjectFlagsMapped = checker.ObjectFlagsMapped +const ObjectFlagsMembersResolved = checker.ObjectFlagsMembersResolved +const ObjectFlagsNonInferrableType = checker.ObjectFlagsNonInferrableType +const ObjectFlagsNone = checker.ObjectFlagsNone +const ObjectFlagsObjectLiteral = checker.ObjectFlagsObjectLiteral +const ObjectFlagsObjectLiteralPatternWithComputedProperties = checker.ObjectFlagsObjectLiteralPatternWithComputedProperties +const ObjectFlagsObjectRestType = checker.ObjectFlagsObjectRestType +const ObjectFlagsObjectTypeKindMask = checker.ObjectFlagsObjectTypeKindMask +const ObjectFlagsPrimitiveUnion = checker.ObjectFlagsPrimitiveUnion +const ObjectFlagsPropagatingFlags = checker.ObjectFlagsPropagatingFlags +const ObjectFlagsReference = checker.ObjectFlagsReference +const ObjectFlagsRequiresWidening = checker.ObjectFlagsRequiresWidening +const ObjectFlagsReverseMapped = checker.ObjectFlagsReverseMapped +const ObjectFlagsSingleSignatureType = checker.ObjectFlagsSingleSignatureType +const ObjectFlagsTuple = checker.ObjectFlagsTuple +type ObjectLiteralDiscriminator = checker.ObjectLiteralDiscriminator +type ObjectType = checker.ObjectType +type ParseFlags = checker.ParseFlags +const ParseFlagsAwait = checker.ParseFlagsAwait +const ParseFlagsIgnoreMissingOpenBrace = checker.ParseFlagsIgnoreMissingOpenBrace +const ParseFlagsJSDoc = checker.ParseFlagsJSDoc +const ParseFlagsNone = checker.ParseFlagsNone +const ParseFlagsType = checker.ParseFlagsType +const ParseFlagsYield = checker.ParseFlagsYield +type PredicateSemantics = checker.PredicateSemantics +const PredicateSemanticsAlways = checker.PredicateSemanticsAlways +const PredicateSemanticsNever = checker.PredicateSemanticsNever +const PredicateSemanticsNone = checker.PredicateSemanticsNone +const PredicateSemanticsSometimes = checker.PredicateSemanticsSometimes +type Program = checker.Program +type PropertiesTypesKey = checker.PropertiesTypesKey +var ReactNames = checker.ReactNames +type RecursionFlags = checker.RecursionFlags +const RecursionFlagsBoth = checker.RecursionFlagsBoth +const RecursionFlagsNone = checker.RecursionFlagsNone +const RecursionFlagsSource = checker.RecursionFlagsSource +const RecursionFlagsTarget = checker.RecursionFlagsTarget +type RecursionId = checker.RecursionId +type ReferenceHint = checker.ReferenceHint +const ReferenceHintDecorator = checker.ReferenceHintDecorator +const ReferenceHintExportAssignment = checker.ReferenceHintExportAssignment +const ReferenceHintExportImportEquals = checker.ReferenceHintExportImportEquals +const ReferenceHintExportSpecifier = checker.ReferenceHintExportSpecifier +const ReferenceHintIdentifier = checker.ReferenceHintIdentifier +const ReferenceHintJsx = checker.ReferenceHintJsx +const ReferenceHintProperty = checker.ReferenceHintProperty +const ReferenceHintUnspecified = checker.ReferenceHintUnspecified +type Relater = checker.Relater +type Relation = checker.Relation +type RelationComparisonResult = checker.RelationComparisonResult +const RelationComparisonResultComplexityOverflow = checker.RelationComparisonResultComplexityOverflow +const RelationComparisonResultFailed = checker.RelationComparisonResultFailed +const RelationComparisonResultNone = checker.RelationComparisonResultNone +const RelationComparisonResultOverflow = checker.RelationComparisonResultOverflow +const RelationComparisonResultReportsMask = checker.RelationComparisonResultReportsMask +const RelationComparisonResultReportsUnmeasurable = checker.RelationComparisonResultReportsUnmeasurable +const RelationComparisonResultReportsUnreliable = checker.RelationComparisonResultReportsUnreliable +const RelationComparisonResultStackDepthOverflow = checker.RelationComparisonResultStackDepthOverflow +const RelationComparisonResultSucceeded = checker.RelationComparisonResultSucceeded +type ReverseMappedSymbolLinks = checker.ReverseMappedSymbolLinks +type ReverseMappedType = checker.ReverseMappedType +type ReverseMappedTypeKey = checker.ReverseMappedTypeKey +type SerializedTypeEntry = checker.SerializedTypeEntry +type SharedFlow = checker.SharedFlow +type Signature = checker.Signature +type extra_Signature struct { + flags checker.SignatureFlags + minArgumentCount int32 + resolvedMinArgumentCount int32 + declaration *ast.Node + typeParameters []*checker.Type + parameters []*ast.Symbol + thisParameter *ast.Symbol + resolvedReturnType *checker.Type + resolvedTypePredicate *checker.TypePredicate + target *checker.Signature + mapper *checker.TypeMapper + isolatedSignatureType *checker.Type + composite *checker.CompositeSignature +} +func Signature_parameters(v *checker.Signature) []*ast.Symbol { + return ((*extra_Signature)(unsafe.Pointer(v))).parameters +} +func Signature_declaration(v *checker.Signature) *ast.Node { + return ((*extra_Signature)(unsafe.Pointer(v))).declaration +} +func Signature_resolvedTypePredicate(v *checker.Signature) *checker.TypePredicate { + return ((*extra_Signature)(unsafe.Pointer(v))).resolvedTypePredicate +} +func Signature_composite(v *checker.Signature) *checker.CompositeSignature { + return ((*extra_Signature)(unsafe.Pointer(v))).composite +} +type SignatureCheckMode = checker.SignatureCheckMode +const SignatureCheckModeBivariantCallback = checker.SignatureCheckModeBivariantCallback +const SignatureCheckModeCallback = checker.SignatureCheckModeCallback +const SignatureCheckModeIgnoreReturnTypes = checker.SignatureCheckModeIgnoreReturnTypes +const SignatureCheckModeNone = checker.SignatureCheckModeNone +const SignatureCheckModeStrictArity = checker.SignatureCheckModeStrictArity +const SignatureCheckModeStrictCallback = checker.SignatureCheckModeStrictCallback +const SignatureCheckModeStrictTopSignature = checker.SignatureCheckModeStrictTopSignature +type SignatureFlags = checker.SignatureFlags +const SignatureFlagsAbstract = checker.SignatureFlagsAbstract +const SignatureFlagsCallChainFlags = checker.SignatureFlagsCallChainFlags +const SignatureFlagsConstruct = checker.SignatureFlagsConstruct +const SignatureFlagsHasLiteralTypes = checker.SignatureFlagsHasLiteralTypes +const SignatureFlagsHasRestParameter = checker.SignatureFlagsHasRestParameter +const SignatureFlagsIsInnerCallChain = checker.SignatureFlagsIsInnerCallChain +const SignatureFlagsIsNonInferrable = checker.SignatureFlagsIsNonInferrable +const SignatureFlagsIsOuterCallChain = checker.SignatureFlagsIsOuterCallChain +const SignatureFlagsIsSignatureCandidateForOverloadFailure = checker.SignatureFlagsIsSignatureCandidateForOverloadFailure +const SignatureFlagsIsUntypedSignatureInJSFile = checker.SignatureFlagsIsUntypedSignatureInJSFile +const SignatureFlagsNone = checker.SignatureFlagsNone +const SignatureFlagsPropagatingFlags = checker.SignatureFlagsPropagatingFlags +var SignatureKeyBase = checker.SignatureKeyBase +var SignatureKeyCanonical = checker.SignatureKeyCanonical +var SignatureKeyErased = checker.SignatureKeyErased +var SignatureKeyInner = checker.SignatureKeyInner +var SignatureKeyOuter = checker.SignatureKeyOuter +type SignatureKind = checker.SignatureKind +const SignatureKindCall = checker.SignatureKindCall +const SignatureKindConstruct = checker.SignatureKindConstruct +type SignatureLinks = checker.SignatureLinks +type SignatureToSignatureDeclarationOptions = checker.SignatureToSignatureDeclarationOptions +type SimpleTypeMapper = checker.SimpleTypeMapper +//go:linkname SkipAlias github.com/microsoft/typescript-go/internal/checker.SkipAlias +func SkipAlias(symbol *ast.Symbol, checker *checker.Checker) *ast.Symbol +type SourceFileLinks = checker.SourceFileLinks +type SpreadLinks = checker.SpreadLinks +type StringLiteralType = checker.StringLiteralType +type StringMappingKey = checker.StringMappingKey +type StringMappingType = checker.StringMappingType +type StructuredType = checker.StructuredType +type SubstitutionType = checker.SubstitutionType +type SubstitutionTypeKey = checker.SubstitutionTypeKey +type SwitchStatementLinks = checker.SwitchStatementLinks +type SymbolFormatFlags = checker.SymbolFormatFlags +const SymbolFormatFlagsAllowAnyNodeKind = checker.SymbolFormatFlagsAllowAnyNodeKind +const SymbolFormatFlagsDoNotIncludeSymbolChain = checker.SymbolFormatFlagsDoNotIncludeSymbolChain +const SymbolFormatFlagsNone = checker.SymbolFormatFlagsNone +const SymbolFormatFlagsUseAliasDefinedOutsideCurrentScope = checker.SymbolFormatFlagsUseAliasDefinedOutsideCurrentScope +const SymbolFormatFlagsUseOnlyExternalAliasing = checker.SymbolFormatFlagsUseOnlyExternalAliasing +const SymbolFormatFlagsWriteComputedProps = checker.SymbolFormatFlagsWriteComputedProps +const SymbolFormatFlagsWriteTypeParametersOrArguments = checker.SymbolFormatFlagsWriteTypeParametersOrArguments +type SymbolNodeLinks = checker.SymbolNodeLinks +type SymbolReferenceLinks = checker.SymbolReferenceLinks +type SymbolTrackerImpl = checker.SymbolTrackerImpl +type TemplateLiteralType = checker.TemplateLiteralType +type Ternary = checker.Ternary +const TernaryFalse = checker.TernaryFalse +const TernaryMaybe = checker.TernaryMaybe +const TernaryTrue = checker.TernaryTrue +const TernaryUnknown = checker.TernaryUnknown +type TrackedSymbolArgs = checker.TrackedSymbolArgs +//go:linkname TryGetModuleSpecifierFromDeclaration github.com/microsoft/typescript-go/internal/checker.TryGetModuleSpecifierFromDeclaration +func TryGetModuleSpecifierFromDeclaration(node *ast.Node) *ast.Node +type TupleElementInfo = checker.TupleElementInfo +type TupleNormalizer = checker.TupleNormalizer +type TupleType = checker.TupleType +type extra_TupleType struct { + checker.InterfaceType + elementInfos []checker.TupleElementInfo + minLength int + fixedLength int + combinedFlags checker.ElementFlags + readonly bool +} +func TupleType_combinedFlags(v *checker.TupleType) checker.ElementFlags { + return ((*extra_TupleType)(unsafe.Pointer(v))).combinedFlags +} +func TupleType_readonly(v *checker.TupleType) bool { + return ((*extra_TupleType)(unsafe.Pointer(v))).readonly +} +type Type = checker.Type +type extra_Type struct { + flags checker.TypeFlags + objectFlags checker.ObjectFlags + id checker.TypeId + symbol *ast.Symbol + alias *checker.TypeAlias + checker *checker.Checker + data checker.TypeData +} +func Type_alias(v *checker.Type) *checker.TypeAlias { + return ((*extra_Type)(unsafe.Pointer(v))).alias +} +func Type_flags(v *checker.Type) checker.TypeFlags { + return ((*extra_Type)(unsafe.Pointer(v))).flags +} +func Type_symbol(v *checker.Type) *ast.Symbol { + return ((*extra_Type)(unsafe.Pointer(v))).symbol +} +func Type_objectFlags(v *checker.Type) checker.ObjectFlags { + return ((*extra_Type)(unsafe.Pointer(v))).objectFlags +} +type TypeAlias = checker.TypeAlias +type TypeAliasLinks = checker.TypeAliasLinks +type TypeBase = checker.TypeBase +type TypeComparer = checker.TypeComparer +type TypeData = checker.TypeData +type TypeDiscriminator = checker.TypeDiscriminator +type TypeFacts = checker.TypeFacts +const TypeFactsAll = checker.TypeFactsAll +const TypeFactsAllTypeofNE = checker.TypeFactsAllTypeofNE +const TypeFactsAndFactsMask = checker.TypeFactsAndFactsMask +const TypeFactsBaseBigIntFacts = checker.TypeFactsBaseBigIntFacts +const TypeFactsBaseBigIntStrictFacts = checker.TypeFactsBaseBigIntStrictFacts +const TypeFactsBaseBooleanFacts = checker.TypeFactsBaseBooleanFacts +const TypeFactsBaseBooleanStrictFacts = checker.TypeFactsBaseBooleanStrictFacts +const TypeFactsBaseNumberFacts = checker.TypeFactsBaseNumberFacts +const TypeFactsBaseNumberStrictFacts = checker.TypeFactsBaseNumberStrictFacts +const TypeFactsBaseStringFacts = checker.TypeFactsBaseStringFacts +const TypeFactsBaseStringStrictFacts = checker.TypeFactsBaseStringStrictFacts +const TypeFactsBigIntFacts = checker.TypeFactsBigIntFacts +const TypeFactsBigIntStrictFacts = checker.TypeFactsBigIntStrictFacts +const TypeFactsBooleanFacts = checker.TypeFactsBooleanFacts +const TypeFactsBooleanStrictFacts = checker.TypeFactsBooleanStrictFacts +const TypeFactsEQNull = checker.TypeFactsEQNull +const TypeFactsEQUndefined = checker.TypeFactsEQUndefined +const TypeFactsEQUndefinedOrNull = checker.TypeFactsEQUndefinedOrNull +const TypeFactsEmptyObjectFacts = checker.TypeFactsEmptyObjectFacts +const TypeFactsEmptyObjectStrictFacts = checker.TypeFactsEmptyObjectStrictFacts +const TypeFactsEmptyStringFacts = checker.TypeFactsEmptyStringFacts +const TypeFactsEmptyStringStrictFacts = checker.TypeFactsEmptyStringStrictFacts +const TypeFactsFalseFacts = checker.TypeFactsFalseFacts +const TypeFactsFalseStrictFacts = checker.TypeFactsFalseStrictFacts +const TypeFactsFalsy = checker.TypeFactsFalsy +const TypeFactsFunctionFacts = checker.TypeFactsFunctionFacts +const TypeFactsFunctionStrictFacts = checker.TypeFactsFunctionStrictFacts +const TypeFactsIsNull = checker.TypeFactsIsNull +const TypeFactsIsUndefined = checker.TypeFactsIsUndefined +const TypeFactsIsUndefinedOrNull = checker.TypeFactsIsUndefinedOrNull +const TypeFactsNENull = checker.TypeFactsNENull +const TypeFactsNEUndefined = checker.TypeFactsNEUndefined +const TypeFactsNEUndefinedOrNull = checker.TypeFactsNEUndefinedOrNull +const TypeFactsNonEmptyStringFacts = checker.TypeFactsNonEmptyStringFacts +const TypeFactsNonEmptyStringStrictFacts = checker.TypeFactsNonEmptyStringStrictFacts +const TypeFactsNonZeroBigIntFacts = checker.TypeFactsNonZeroBigIntFacts +const TypeFactsNonZeroBigIntStrictFacts = checker.TypeFactsNonZeroBigIntStrictFacts +const TypeFactsNonZeroNumberFacts = checker.TypeFactsNonZeroNumberFacts +const TypeFactsNonZeroNumberStrictFacts = checker.TypeFactsNonZeroNumberStrictFacts +const TypeFactsNone = checker.TypeFactsNone +const TypeFactsNullFacts = checker.TypeFactsNullFacts +const TypeFactsNumberFacts = checker.TypeFactsNumberFacts +const TypeFactsNumberStrictFacts = checker.TypeFactsNumberStrictFacts +const TypeFactsObjectFacts = checker.TypeFactsObjectFacts +const TypeFactsObjectStrictFacts = checker.TypeFactsObjectStrictFacts +const TypeFactsOrFactsMask = checker.TypeFactsOrFactsMask +const TypeFactsStringFacts = checker.TypeFactsStringFacts +const TypeFactsStringStrictFacts = checker.TypeFactsStringStrictFacts +const TypeFactsSymbolFacts = checker.TypeFactsSymbolFacts +const TypeFactsSymbolStrictFacts = checker.TypeFactsSymbolStrictFacts +const TypeFactsTrueFacts = checker.TypeFactsTrueFacts +const TypeFactsTrueStrictFacts = checker.TypeFactsTrueStrictFacts +const TypeFactsTruthy = checker.TypeFactsTruthy +const TypeFactsTypeofEQBigInt = checker.TypeFactsTypeofEQBigInt +const TypeFactsTypeofEQBoolean = checker.TypeFactsTypeofEQBoolean +const TypeFactsTypeofEQFunction = checker.TypeFactsTypeofEQFunction +const TypeFactsTypeofEQHostObject = checker.TypeFactsTypeofEQHostObject +const TypeFactsTypeofEQNumber = checker.TypeFactsTypeofEQNumber +const TypeFactsTypeofEQObject = checker.TypeFactsTypeofEQObject +const TypeFactsTypeofEQString = checker.TypeFactsTypeofEQString +const TypeFactsTypeofEQSymbol = checker.TypeFactsTypeofEQSymbol +const TypeFactsTypeofNEBigInt = checker.TypeFactsTypeofNEBigInt +const TypeFactsTypeofNEBoolean = checker.TypeFactsTypeofNEBoolean +const TypeFactsTypeofNEFunction = checker.TypeFactsTypeofNEFunction +const TypeFactsTypeofNEHostObject = checker.TypeFactsTypeofNEHostObject +const TypeFactsTypeofNENumber = checker.TypeFactsTypeofNENumber +const TypeFactsTypeofNEObject = checker.TypeFactsTypeofNEObject +const TypeFactsTypeofNEString = checker.TypeFactsTypeofNEString +const TypeFactsTypeofNESymbol = checker.TypeFactsTypeofNESymbol +const TypeFactsUndefinedFacts = checker.TypeFactsUndefinedFacts +const TypeFactsUnknownFacts = checker.TypeFactsUnknownFacts +const TypeFactsVoidFacts = checker.TypeFactsVoidFacts +const TypeFactsZeroBigIntFacts = checker.TypeFactsZeroBigIntFacts +const TypeFactsZeroBigIntStrictFacts = checker.TypeFactsZeroBigIntStrictFacts +const TypeFactsZeroNumberFacts = checker.TypeFactsZeroNumberFacts +const TypeFactsZeroNumberStrictFacts = checker.TypeFactsZeroNumberStrictFacts +type TypeFlags = checker.TypeFlags +const TypeFlagsAny = checker.TypeFlagsAny +const TypeFlagsAnyOrUnknown = checker.TypeFlagsAnyOrUnknown +const TypeFlagsBigInt = checker.TypeFlagsBigInt +const TypeFlagsBigIntLike = checker.TypeFlagsBigIntLike +const TypeFlagsBigIntLiteral = checker.TypeFlagsBigIntLiteral +const TypeFlagsBoolean = checker.TypeFlagsBoolean +const TypeFlagsBooleanLike = checker.TypeFlagsBooleanLike +const TypeFlagsBooleanLiteral = checker.TypeFlagsBooleanLiteral +const TypeFlagsConditional = checker.TypeFlagsConditional +const TypeFlagsDefinitelyFalsy = checker.TypeFlagsDefinitelyFalsy +const TypeFlagsDefinitelyNonNullable = checker.TypeFlagsDefinitelyNonNullable +const TypeFlagsDisjointDomains = checker.TypeFlagsDisjointDomains +const TypeFlagsESSymbol = checker.TypeFlagsESSymbol +const TypeFlagsESSymbolLike = checker.TypeFlagsESSymbolLike +const TypeFlagsEnum = checker.TypeFlagsEnum +const TypeFlagsEnumLike = checker.TypeFlagsEnumLike +const TypeFlagsEnumLiteral = checker.TypeFlagsEnumLiteral +const TypeFlagsFreshable = checker.TypeFlagsFreshable +const TypeFlagsIncludesConstrainedTypeVariable = checker.TypeFlagsIncludesConstrainedTypeVariable +const TypeFlagsIncludesEmptyObject = checker.TypeFlagsIncludesEmptyObject +const TypeFlagsIncludesError = checker.TypeFlagsIncludesError +const TypeFlagsIncludesInstantiable = checker.TypeFlagsIncludesInstantiable +const TypeFlagsIncludesMask = checker.TypeFlagsIncludesMask +const TypeFlagsIncludesMissingType = checker.TypeFlagsIncludesMissingType +const TypeFlagsIncludesNonWideningType = checker.TypeFlagsIncludesNonWideningType +const TypeFlagsIncludesWildcard = checker.TypeFlagsIncludesWildcard +const TypeFlagsIndex = checker.TypeFlagsIndex +const TypeFlagsIndexedAccess = checker.TypeFlagsIndexedAccess +const TypeFlagsInstantiable = checker.TypeFlagsInstantiable +const TypeFlagsInstantiableNonPrimitive = checker.TypeFlagsInstantiableNonPrimitive +const TypeFlagsInstantiablePrimitive = checker.TypeFlagsInstantiablePrimitive +const TypeFlagsIntersection = checker.TypeFlagsIntersection +const TypeFlagsIntrinsic = checker.TypeFlagsIntrinsic +const TypeFlagsLiteral = checker.TypeFlagsLiteral +const TypeFlagsNarrowable = checker.TypeFlagsNarrowable +const TypeFlagsNever = checker.TypeFlagsNever +const TypeFlagsNonPrimitive = checker.TypeFlagsNonPrimitive +const TypeFlagsNone = checker.TypeFlagsNone +const TypeFlagsNotPrimitiveUnion = checker.TypeFlagsNotPrimitiveUnion +const TypeFlagsNull = checker.TypeFlagsNull +const TypeFlagsNullable = checker.TypeFlagsNullable +const TypeFlagsNumber = checker.TypeFlagsNumber +const TypeFlagsNumberLike = checker.TypeFlagsNumberLike +const TypeFlagsNumberLiteral = checker.TypeFlagsNumberLiteral +const TypeFlagsObject = checker.TypeFlagsObject +const TypeFlagsObjectFlagsType = checker.TypeFlagsObjectFlagsType +const TypeFlagsPossiblyFalsy = checker.TypeFlagsPossiblyFalsy +const TypeFlagsPrimitive = checker.TypeFlagsPrimitive +const TypeFlagsReserved1 = checker.TypeFlagsReserved1 +const TypeFlagsReserved2 = checker.TypeFlagsReserved2 +const TypeFlagsReserved3 = checker.TypeFlagsReserved3 +const TypeFlagsSimplifiable = checker.TypeFlagsSimplifiable +const TypeFlagsSingleton = checker.TypeFlagsSingleton +const TypeFlagsString = checker.TypeFlagsString +const TypeFlagsStringLike = checker.TypeFlagsStringLike +const TypeFlagsStringLiteral = checker.TypeFlagsStringLiteral +const TypeFlagsStringMapping = checker.TypeFlagsStringMapping +const TypeFlagsStringOrNumberLiteral = checker.TypeFlagsStringOrNumberLiteral +const TypeFlagsStringOrNumberLiteralOrUnique = checker.TypeFlagsStringOrNumberLiteralOrUnique +const TypeFlagsStructuredOrInstantiable = checker.TypeFlagsStructuredOrInstantiable +const TypeFlagsStructuredType = checker.TypeFlagsStructuredType +const TypeFlagsSubstitution = checker.TypeFlagsSubstitution +const TypeFlagsTemplateLiteral = checker.TypeFlagsTemplateLiteral +const TypeFlagsTypeParameter = checker.TypeFlagsTypeParameter +const TypeFlagsTypeVariable = checker.TypeFlagsTypeVariable +const TypeFlagsUndefined = checker.TypeFlagsUndefined +const TypeFlagsUnion = checker.TypeFlagsUnion +const TypeFlagsUnionOrIntersection = checker.TypeFlagsUnionOrIntersection +const TypeFlagsUniqueESSymbol = checker.TypeFlagsUniqueESSymbol +const TypeFlagsUnit = checker.TypeFlagsUnit +const TypeFlagsUnknown = checker.TypeFlagsUnknown +const TypeFlagsVoid = checker.TypeFlagsVoid +const TypeFlagsVoidLike = checker.TypeFlagsVoidLike +type TypeFormatFlags = checker.TypeFormatFlags +const TypeFormatFlagsAddUndefined = checker.TypeFormatFlagsAddUndefined +const TypeFormatFlagsAllowUniqueESSymbolType = checker.TypeFormatFlagsAllowUniqueESSymbolType +const TypeFormatFlagsGenerateNamesForShadowedTypeParams = checker.TypeFormatFlagsGenerateNamesForShadowedTypeParams +const TypeFormatFlagsInArrayType = checker.TypeFormatFlagsInArrayType +const TypeFormatFlagsInElementType = checker.TypeFormatFlagsInElementType +const TypeFormatFlagsInFirstTypeArgument = checker.TypeFormatFlagsInFirstTypeArgument +const TypeFormatFlagsInTypeAlias = checker.TypeFormatFlagsInTypeAlias +const TypeFormatFlagsMultilineObjectLiterals = checker.TypeFormatFlagsMultilineObjectLiterals +const TypeFormatFlagsNoTruncation = checker.TypeFormatFlagsNoTruncation +const TypeFormatFlagsNoTypeReduction = checker.TypeFormatFlagsNoTypeReduction +const TypeFormatFlagsNodeBuilderFlagsMask = checker.TypeFormatFlagsNodeBuilderFlagsMask +const TypeFormatFlagsNone = checker.TypeFormatFlagsNone +const TypeFormatFlagsOmitParameterModifiers = checker.TypeFormatFlagsOmitParameterModifiers +const TypeFormatFlagsOmitThisParameter = checker.TypeFormatFlagsOmitThisParameter +const TypeFormatFlagsSuppressAnyReturnType = checker.TypeFormatFlagsSuppressAnyReturnType +const TypeFormatFlagsUseAliasDefinedOutsideCurrentScope = checker.TypeFormatFlagsUseAliasDefinedOutsideCurrentScope +const TypeFormatFlagsUseFullyQualifiedType = checker.TypeFormatFlagsUseFullyQualifiedType +const TypeFormatFlagsUseSingleQuotesForStringLiteralType = checker.TypeFormatFlagsUseSingleQuotesForStringLiteralType +const TypeFormatFlagsUseStructuralFallback = checker.TypeFormatFlagsUseStructuralFallback +const TypeFormatFlagsUseTypeOfFunction = checker.TypeFormatFlagsUseTypeOfFunction +const TypeFormatFlagsWriteArrayAsGenericType = checker.TypeFormatFlagsWriteArrayAsGenericType +const TypeFormatFlagsWriteArrowStyleSignature = checker.TypeFormatFlagsWriteArrowStyleSignature +const TypeFormatFlagsWriteCallStyleSignature = checker.TypeFormatFlagsWriteCallStyleSignature +const TypeFormatFlagsWriteClassExpressionAsTypeLiteral = checker.TypeFormatFlagsWriteClassExpressionAsTypeLiteral +const TypeFormatFlagsWriteTypeArgumentsOfSignature = checker.TypeFormatFlagsWriteTypeArgumentsOfSignature +type TypeId = checker.TypeId +type TypeMapper = checker.TypeMapper +type TypeMapperBase = checker.TypeMapperBase +type TypeMapperData = checker.TypeMapperData +type TypeMapperKind = checker.TypeMapperKind +const TypeMapperKindArray = checker.TypeMapperKindArray +const TypeMapperKindMerged = checker.TypeMapperKindMerged +const TypeMapperKindSimple = checker.TypeMapperKindSimple +const TypeMapperKindUnknown = checker.TypeMapperKindUnknown +type TypeNodeLinks = checker.TypeNodeLinks +type TypeParameter = checker.TypeParameter +type TypePredicate = checker.TypePredicate +type extra_TypePredicate struct { + kind checker.TypePredicateKind + parameterIndex int32 + parameterName string + t *checker.Type +} +func TypePredicate_kind(v *checker.TypePredicate) checker.TypePredicateKind { + return ((*extra_TypePredicate)(unsafe.Pointer(v))).kind +} +func TypePredicate_t(v *checker.TypePredicate) *checker.Type { + return ((*extra_TypePredicate)(unsafe.Pointer(v))).t +} +func TypePredicate_parameterIndex(v *checker.TypePredicate) int32 { + return ((*extra_TypePredicate)(unsafe.Pointer(v))).parameterIndex +} +type TypePredicateKind = checker.TypePredicateKind +const TypePredicateKindAssertsIdentifier = checker.TypePredicateKindAssertsIdentifier +const TypePredicateKindAssertsThis = checker.TypePredicateKindAssertsThis +const TypePredicateKindIdentifier = checker.TypePredicateKindIdentifier +const TypePredicateKindThis = checker.TypePredicateKindThis +type TypeReference = checker.TypeReference +type TypeResolution = checker.TypeResolution +type TypeSystemEntity = checker.TypeSystemEntity +type TypeSystemPropertyName = checker.TypeSystemPropertyName +const TypeSystemPropertyNameAliasTarget = checker.TypeSystemPropertyNameAliasTarget +const TypeSystemPropertyNameDeclaredType = checker.TypeSystemPropertyNameDeclaredType +const TypeSystemPropertyNameInitializerIsUndefined = checker.TypeSystemPropertyNameInitializerIsUndefined +const TypeSystemPropertyNameResolvedBaseConstraint = checker.TypeSystemPropertyNameResolvedBaseConstraint +const TypeSystemPropertyNameResolvedBaseConstructorType = checker.TypeSystemPropertyNameResolvedBaseConstructorType +const TypeSystemPropertyNameResolvedBaseTypes = checker.TypeSystemPropertyNameResolvedBaseTypes +const TypeSystemPropertyNameResolvedReturnType = checker.TypeSystemPropertyNameResolvedReturnType +const TypeSystemPropertyNameResolvedTypeArguments = checker.TypeSystemPropertyNameResolvedTypeArguments +const TypeSystemPropertyNameType = checker.TypeSystemPropertyNameType +const TypeSystemPropertyNameWriteType = checker.TypeSystemPropertyNameWriteType +type UnionOfUnionKey = checker.UnionOfUnionKey +type UnionOrIntersectionType = checker.UnionOrIntersectionType +type UnionReduction = checker.UnionReduction +const UnionReductionLiteral = checker.UnionReductionLiteral +const UnionReductionNone = checker.UnionReductionNone +const UnionReductionSubtype = checker.UnionReductionSubtype +type UnionType = checker.UnionType +type UniqueESSymbolType = checker.UniqueESSymbolType +type UnusedKind = checker.UnusedKind +const UnusedKindLocal = checker.UnusedKindLocal +const UnusedKindParameter = checker.UnusedKindParameter +type ValueSymbolLinks = checker.ValueSymbolLinks +//go:linkname ValueToString github.com/microsoft/typescript-go/internal/checker.ValueToString +func ValueToString(value any) string +type VarianceFlags = checker.VarianceFlags +const VarianceFlagsAllowsStructuralFallback = checker.VarianceFlagsAllowsStructuralFallback +const VarianceFlagsBivariant = checker.VarianceFlagsBivariant +const VarianceFlagsContravariant = checker.VarianceFlagsContravariant +const VarianceFlagsCovariant = checker.VarianceFlagsCovariant +const VarianceFlagsIndependent = checker.VarianceFlagsIndependent +const VarianceFlagsInvariant = checker.VarianceFlagsInvariant +const VarianceFlagsUnmeasurable = checker.VarianceFlagsUnmeasurable +const VarianceFlagsUnreliable = checker.VarianceFlagsUnreliable +const VarianceFlagsVarianceMask = checker.VarianceFlagsVarianceMask +type VarianceLinks = checker.VarianceLinks +type WideningContext = checker.WideningContext +type WideningKind = checker.WideningKind +const WideningKindFunctionReturn = checker.WideningKindFunctionReturn +const WideningKindGeneratorNext = checker.WideningKindGeneratorNext +const WideningKindGeneratorYield = checker.WideningKindGeneratorYield +const WideningKindNormal = checker.WideningKindNormal +//go:linkname GetMappedTypeModifiers github.com/microsoft/typescript-go/internal/checker.getMappedTypeModifiers +func GetMappedTypeModifiers(t *checker.Type) checker.MappedTypeModifiers +//go:linkname IsNonDeferredTypeReference github.com/microsoft/typescript-go/internal/checker.isNonDeferredTypeReference +func IsNonDeferredTypeReference(t *checker.Type) bool diff --git a/shim/checkershim/shim.go b/shim/checkershim/shim.go deleted file mode 100644 index 1a331c0..0000000 --- a/shim/checkershim/shim.go +++ /dev/null @@ -1,39 +0,0 @@ -// Package checkershim provides tslua-specific shims for checker internals -// not exposed by tsgolint's generated checker shim. -package checkershim - -import ( - "unsafe" - - "github.com/microsoft/typescript-go/internal/ast" - "github.com/microsoft/typescript-go/internal/checker" -) - -type extra_Signature struct { - flags checker.SignatureFlags - minArgumentCount int32 - resolvedMinArgumentCount int32 - declaration *ast.Node - typeParameters []*checker.Type - parameters []*ast.Symbol - thisParameter *ast.Symbol - resolvedReturnType *checker.Type - resolvedTypePredicate *checker.TypePredicate - target *checker.Signature - mapper *checker.TypeMapper - isolatedSignatureType *checker.Type - composite *checker.CompositeSignature -} - -func Signature_composite(v *checker.Signature) *checker.CompositeSignature { - return ((*extra_Signature)(unsafe.Pointer(v))).composite -} - -type extra_CompositeSignature struct { - isUnion bool - signatures []*checker.Signature -} - -func CompositeSignature_signatures(v *checker.CompositeSignature) []*checker.Signature { - return ((*extra_CompositeSignature)(unsafe.Pointer(v))).signatures -} diff --git a/shim/compiler/extra-shim.json b/shim/compiler/extra-shim.json new file mode 100644 index 0000000..72eb720 --- /dev/null +++ b/shim/compiler/extra-shim.json @@ -0,0 +1,12 @@ +{ + "ExtraMethods": { + "Program": [ + "ForEachCheckerParallel", + "GetSemanticDiagnostics", + "GetSyntacticDiagnostics", + "UpdateProgram", + "IsSourceFileDefaultLibrary", + "IsSourceFileFromExternalLibrary" + ] + } +} diff --git a/shim/compiler/shim.go b/shim/compiler/shim.go index 1ad94bf..b68ad76 100644 --- a/shim/compiler/shim.go +++ b/shim/compiler/shim.go @@ -1,90 +1,64 @@ -// Package compiler wraps tsgolint's compiler shim and adds Program_UpdateProgram. -package compiler -import ( - "context" +// Code generated by tools/gen_shims. DO NOT EDIT. - "github.com/microsoft/typescript-go/internal/ast" - "github.com/microsoft/typescript-go/internal/checker" - "github.com/microsoft/typescript-go/internal/compiler" - "github.com/microsoft/typescript-go/internal/core" - "github.com/microsoft/typescript-go/internal/diagnostics" - "github.com/microsoft/typescript-go/internal/tsoptions" - "github.com/microsoft/typescript-go/internal/tspath" - "github.com/microsoft/typescript-go/internal/vfs" +package compiler - _ "unsafe" -) +import "context" +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/checker" +import "github.com/microsoft/typescript-go/internal/compiler" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/diagnostics" +import "github.com/microsoft/typescript-go/internal/tsoptions" +import "github.com/microsoft/typescript-go/internal/tspath" +import "github.com/microsoft/typescript-go/internal/vfs" +import _ "unsafe" type CheckerPool = compiler.CheckerPool - //go:linkname CombineEmitResults github.com/microsoft/typescript-go/internal/compiler.CombineEmitResults func CombineEmitResults(results []*compiler.EmitResult) *compiler.EmitResult - type CompilerHost = compiler.CompilerHost - +type DuplicateSourceFile = compiler.DuplicateSourceFile const EmitAll = compiler.EmitAll - type EmitHost = compiler.EmitHost type EmitOnly = compiler.EmitOnly - const EmitOnlyDts = compiler.EmitOnlyDts const EmitOnlyForcedDts = compiler.EmitOnlyForcedDts const EmitOnlyJs = compiler.EmitOnlyJs - type EmitOptions = compiler.EmitOptions type EmitResult = compiler.EmitResult type FileIncludeReason = compiler.FileIncludeReason - //go:linkname FilterNoEmitSemanticDiagnostics github.com/microsoft/typescript-go/internal/compiler.FilterNoEmitSemanticDiagnostics func FilterNoEmitSemanticDiagnostics(diagnostics []*ast.Diagnostic, options *core.CompilerOptions) []*ast.Diagnostic - //go:linkname GetDiagnosticsOfAnyProgram github.com/microsoft/typescript-go/internal/compiler.GetDiagnosticsOfAnyProgram func GetDiagnosticsOfAnyProgram(ctx context.Context, program compiler.ProgramLike, file *ast.SourceFile, skipNoEmitCheckForDtsDiagnostics bool, getBindDiagnostics func(context.Context, *ast.SourceFile) []*ast.Diagnostic, getSemanticDiagnostics func(context.Context, *ast.SourceFile) []*ast.Diagnostic) []*ast.Diagnostic - //go:linkname HandleNoEmitOnError github.com/microsoft/typescript-go/internal/compiler.HandleNoEmitOnError func HandleNoEmitOnError(ctx context.Context, program compiler.ProgramLike, file *ast.SourceFile) *compiler.EmitResult - type LibFile = compiler.LibFile - //go:linkname NewCachedFSCompilerHost github.com/microsoft/typescript-go/internal/compiler.NewCachedFSCompilerHost func NewCachedFSCompilerHost(currentDirectory string, fs vfs.FS, defaultLibraryPath string, extendedConfigCache tsoptions.ExtendedConfigCache, trace func(msg *diagnostics.Message, args ...any)) compiler.CompilerHost - //go:linkname NewCompilerHost github.com/microsoft/typescript-go/internal/compiler.NewCompilerHost func NewCompilerHost(currentDirectory string, fs vfs.FS, defaultLibraryPath string, extendedConfigCache tsoptions.ExtendedConfigCache, trace func(msg *diagnostics.Message, args ...any)) compiler.CompilerHost - //go:linkname NewProgram github.com/microsoft/typescript-go/internal/compiler.NewProgram func NewProgram(opts compiler.ProgramOptions) *compiler.Program - type Program = compiler.Program - +//go:linkname Program_UpdateProgram github.com/microsoft/typescript-go/internal/compiler.(*Program).UpdateProgram +func Program_UpdateProgram(recv *compiler.Program, changedFilePath tspath.Path, newHost compiler.CompilerHost) (*compiler.Program, bool) //go:linkname Program_ForEachCheckerParallel github.com/microsoft/typescript-go/internal/compiler.(*Program).ForEachCheckerParallel func Program_ForEachCheckerParallel(recv *compiler.Program, cb func(idx int, c *checker.Checker)) - //go:linkname Program_GetSyntacticDiagnostics github.com/microsoft/typescript-go/internal/compiler.(*Program).GetSyntacticDiagnostics func Program_GetSyntacticDiagnostics(recv *compiler.Program, ctx context.Context, sourceFile *ast.SourceFile) []*ast.Diagnostic - //go:linkname Program_GetSemanticDiagnostics github.com/microsoft/typescript-go/internal/compiler.(*Program).GetSemanticDiagnostics func Program_GetSemanticDiagnostics(recv *compiler.Program, ctx context.Context, sourceFile *ast.SourceFile) []*ast.Diagnostic - +//go:linkname Program_IsSourceFileDefaultLibrary github.com/microsoft/typescript-go/internal/compiler.(*Program).IsSourceFileDefaultLibrary +func Program_IsSourceFileDefaultLibrary(recv *compiler.Program, path tspath.Path) bool +//go:linkname Program_IsSourceFileFromExternalLibrary github.com/microsoft/typescript-go/internal/compiler.(*Program).IsSourceFileFromExternalLibrary +func Program_IsSourceFileFromExternalLibrary(recv *compiler.Program, file *ast.SourceFile) bool type ProgramLike = compiler.ProgramLike type ProgramOptions = compiler.ProgramOptions - //go:linkname SortAndDeduplicateDiagnostics github.com/microsoft/typescript-go/internal/compiler.SortAndDeduplicateDiagnostics func SortAndDeduplicateDiagnostics(diagnostics []*ast.Diagnostic) []*ast.Diagnostic - type SourceFileMayBeEmittedHost = compiler.SourceFileMayBeEmittedHost type SourceMapEmitResult = compiler.SourceMapEmitResult type WriteFile = compiler.WriteFile type WriteFileData = compiler.WriteFileData - -// --- tslua additions --- - -//go:linkname Program_UpdateProgram github.com/microsoft/typescript-go/internal/compiler.(*Program).UpdateProgram -func Program_UpdateProgram(recv *compiler.Program, changedFilePath tspath.Path, newHost compiler.CompilerHost) (*compiler.Program, bool) - -//go:linkname Program_IsSourceFileDefaultLibrary github.com/microsoft/typescript-go/internal/compiler.(*Program).IsSourceFileDefaultLibrary -func Program_IsSourceFileDefaultLibrary(recv *compiler.Program, path tspath.Path) bool - -//go:linkname Program_IsSourceFileFromExternalLibrary github.com/microsoft/typescript-go/internal/compiler.(*Program).IsSourceFileFromExternalLibrary -func Program_IsSourceFileFromExternalLibrary(recv *compiler.Program, file *ast.SourceFile) bool diff --git a/shim/core/go.mod b/shim/core/go.mod new file mode 100644 index 0000000..82666df --- /dev/null +++ b/shim/core/go.mod @@ -0,0 +1,10 @@ +module github.com/microsoft/typescript-go/shim/core + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + golang.org/x/sync v0.19.0 // indirect +) diff --git a/shim/core/go.sum b/shim/core/go.sum new file mode 100644 index 0000000..fafefd5 --- /dev/null +++ b/shim/core/go.sum @@ -0,0 +1,10 @@ +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/core/shim.go b/shim/core/shim.go new file mode 100644 index 0000000..3bb3fab --- /dev/null +++ b/shim/core/shim.go @@ -0,0 +1,183 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package core + +import "context" +import "github.com/microsoft/typescript-go/internal/core" +import "iter" +import _ "unsafe" + +//go:linkname ApplyBulkEdits github.com/microsoft/typescript-go/internal/core.ApplyBulkEdits +func ApplyBulkEdits(text string, edits []core.TextChange) string +//go:linkname BoolToTristate github.com/microsoft/typescript-go/internal/core.BoolToTristate +func BoolToTristate(b bool) core.Tristate +type BreadthFirstSearchLevel[K comparable, N any] = core.BreadthFirstSearchLevel[K,N] +type BreadthFirstSearchOptions[K comparable, N any] = core.BreadthFirstSearchOptions[K,N] +type BreadthFirstSearchResult[N any] = core.BreadthFirstSearchResult[N] +type BuildOptions = core.BuildOptions +//go:linkname CompareBooleans github.com/microsoft/typescript-go/internal/core.CompareBooleans +func CompareBooleans(a bool, b bool) int +//go:linkname CompareTextRanges github.com/microsoft/typescript-go/internal/core.CompareTextRanges +func CompareTextRanges(r1 core.TextRange, r2 core.TextRange) int +type CompilerOptions = core.CompilerOptions +//go:linkname ComputeECMALineStarts github.com/microsoft/typescript-go/internal/core.ComputeECMALineStarts +func ComputeECMALineStarts(text string) core.ECMALineStarts +//go:linkname ComputeECMALineStartsSeq github.com/microsoft/typescript-go/internal/core.ComputeECMALineStartsSeq +func ComputeECMALineStartsSeq(text string) iter.Seq[core.TextPos] +type ECMALineStarts = core.ECMALineStarts +var EmptyCompilerOptions = core.EmptyCompilerOptions +var ExclusivelyPrefixedNodeCoreModules = core.ExclusivelyPrefixedNodeCoreModules +//go:linkname GetNewLineKind github.com/microsoft/typescript-go/internal/core.GetNewLineKind +func GetNewLineKind(s string) core.NewLineKind +//go:linkname GetRequestID github.com/microsoft/typescript-go/internal/core.GetRequestID +func GetRequestID(ctx context.Context) string +//go:linkname GetScriptKindFromFileName github.com/microsoft/typescript-go/internal/core.GetScriptKindFromFileName +func GetScriptKindFromFileName(fileName string) core.ScriptKind +//go:linkname GetSpellingSuggestionForStrings github.com/microsoft/typescript-go/internal/core.GetSpellingSuggestionForStrings +func GetSpellingSuggestionForStrings(name string, candidates iter.Seq[string]) string +//go:linkname IndexAfter github.com/microsoft/typescript-go/internal/core.IndexAfter +func IndexAfter(s string, pattern string, startIndex int) int +type JsxEmit = core.JsxEmit +const JsxEmitNone = core.JsxEmitNone +const JsxEmitPreserve = core.JsxEmitPreserve +const JsxEmitReact = core.JsxEmitReact +const JsxEmitReactJSX = core.JsxEmitReactJSX +const JsxEmitReactJSXDev = core.JsxEmitReactJSXDev +const JsxEmitReactNative = core.JsxEmitReactNative +type LanguageVariant = core.LanguageVariant +const LanguageVariantJSX = core.LanguageVariantJSX +const LanguageVariantStandard = core.LanguageVariantStandard +type LinkStore[K comparable, V any] = core.LinkStore[K,V] +type ModuleDetectionKind = core.ModuleDetectionKind +const ModuleDetectionKindAuto = core.ModuleDetectionKindAuto +const ModuleDetectionKindForce = core.ModuleDetectionKindForce +const ModuleDetectionKindLegacy = core.ModuleDetectionKindLegacy +const ModuleDetectionKindNone = core.ModuleDetectionKindNone +type ModuleKind = core.ModuleKind +const ModuleKindAMD = core.ModuleKindAMD +const ModuleKindCommonJS = core.ModuleKindCommonJS +const ModuleKindES2015 = core.ModuleKindES2015 +const ModuleKindES2020 = core.ModuleKindES2020 +const ModuleKindES2022 = core.ModuleKindES2022 +const ModuleKindESNext = core.ModuleKindESNext +const ModuleKindNode16 = core.ModuleKindNode16 +const ModuleKindNode18 = core.ModuleKindNode18 +const ModuleKindNode20 = core.ModuleKindNode20 +const ModuleKindNodeNext = core.ModuleKindNodeNext +const ModuleKindNone = core.ModuleKindNone +const ModuleKindPreserve = core.ModuleKindPreserve +const ModuleKindSystem = core.ModuleKindSystem +var ModuleKindToModuleResolutionKind = core.ModuleKindToModuleResolutionKind +const ModuleKindUMD = core.ModuleKindUMD +type ModuleResolutionKind = core.ModuleResolutionKind +const ModuleResolutionKindBundler = core.ModuleResolutionKindBundler +const ModuleResolutionKindClassic = core.ModuleResolutionKindClassic +const ModuleResolutionKindNode10 = core.ModuleResolutionKindNode10 +const ModuleResolutionKindNode16 = core.ModuleResolutionKindNode16 +const ModuleResolutionKindNodeNext = core.ModuleResolutionKindNodeNext +const ModuleResolutionKindUnknown = core.ModuleResolutionKindUnknown +type NewLineKind = core.NewLineKind +const NewLineKindCRLF = core.NewLineKindCRLF +const NewLineKindLF = core.NewLineKindLF +const NewLineKindNone = core.NewLineKindNone +//go:linkname NewTextRange github.com/microsoft/typescript-go/internal/core.NewTextRange +func NewTextRange(pos int, end int) core.TextRange +//go:linkname NewThrottleGroup github.com/microsoft/typescript-go/internal/core.NewThrottleGroup +func NewThrottleGroup(ctx context.Context, semaphore chan struct{}) *core.ThrottleGroup +//go:linkname NewWorkGroup github.com/microsoft/typescript-go/internal/core.NewWorkGroup +func NewWorkGroup(singleThreaded bool) core.WorkGroup +var NodeCoreModules = core.NodeCoreModules +//go:linkname NonRelativeModuleNameForTypingCache github.com/microsoft/typescript-go/internal/core.NonRelativeModuleNameForTypingCache +func NonRelativeModuleNameForTypingCache(moduleName string) string +type ParsedOptions = core.ParsedOptions +type Pattern = core.Pattern +type PollingKind = core.PollingKind +const PollingKindDynamicPriority = core.PollingKindDynamicPriority +const PollingKindFixedChunkSize = core.PollingKindFixedChunkSize +const PollingKindFixedInterval = core.PollingKindFixedInterval +const PollingKindNone = core.PollingKindNone +const PollingKindPriorityInterval = core.PollingKindPriorityInterval +type Pool[T any] = core.Pool[T] +//go:linkname PositionToLineAndByteOffset github.com/microsoft/typescript-go/internal/core.PositionToLineAndByteOffset +func PositionToLineAndByteOffset(position int, lineStarts []core.TextPos) (line int, byteOffset int) +type ProjectReference = core.ProjectReference +type ResolutionMode = core.ResolutionMode +const ResolutionModeCommonJS = core.ResolutionModeCommonJS +const ResolutionModeESM = core.ResolutionModeESM +const ResolutionModeNone = core.ResolutionModeNone +//go:linkname ResolveConfigFileNameOfProjectReference github.com/microsoft/typescript-go/internal/core.ResolveConfigFileNameOfProjectReference +func ResolveConfigFileNameOfProjectReference(path string) string +//go:linkname ResolveProjectReferencePath github.com/microsoft/typescript-go/internal/core.ResolveProjectReferencePath +func ResolveProjectReferencePath(ref *core.ProjectReference) string +type ScriptKind = core.ScriptKind +const ScriptKindDeferred = core.ScriptKindDeferred +const ScriptKindExternal = core.ScriptKindExternal +const ScriptKindJS = core.ScriptKindJS +const ScriptKindJSON = core.ScriptKindJSON +const ScriptKindJSX = core.ScriptKindJSX +const ScriptKindTS = core.ScriptKindTS +const ScriptKindTSX = core.ScriptKindTSX +const ScriptKindUnknown = core.ScriptKindUnknown +type ScriptTarget = core.ScriptTarget +const ScriptTargetES2015 = core.ScriptTargetES2015 +const ScriptTargetES2016 = core.ScriptTargetES2016 +const ScriptTargetES2017 = core.ScriptTargetES2017 +const ScriptTargetES2018 = core.ScriptTargetES2018 +const ScriptTargetES2019 = core.ScriptTargetES2019 +const ScriptTargetES2020 = core.ScriptTargetES2020 +const ScriptTargetES2021 = core.ScriptTargetES2021 +const ScriptTargetES2022 = core.ScriptTargetES2022 +const ScriptTargetES2023 = core.ScriptTargetES2023 +const ScriptTargetES2024 = core.ScriptTargetES2024 +const ScriptTargetES2025 = core.ScriptTargetES2025 +const ScriptTargetES5 = core.ScriptTargetES5 +const ScriptTargetESNext = core.ScriptTargetESNext +const ScriptTargetJSON = core.ScriptTargetJSON +const ScriptTargetLatest = core.ScriptTargetLatest +const ScriptTargetLatestStandard = core.ScriptTargetLatestStandard +const ScriptTargetNone = core.ScriptTargetNone +//go:linkname ShouldRewriteModuleSpecifier github.com/microsoft/typescript-go/internal/core.ShouldRewriteModuleSpecifier +func ShouldRewriteModuleSpecifier(specifier string, compilerOptions *core.CompilerOptions) bool +type Stack[T any] = core.Stack[T] +//go:linkname StringifyJson github.com/microsoft/typescript-go/internal/core.StringifyJson +func StringifyJson(input any, prefix string, indent string) (string, error) +const TSFalse = core.TSFalse +const TSTrue = core.TSTrue +const TSUnknown = core.TSUnknown +type TextChange = core.TextChange +type TextPos = core.TextPos +type TextRange = core.TextRange +type ThrottleGroup = core.ThrottleGroup +type Tristate = core.Tristate +//go:linkname TryParsePattern github.com/microsoft/typescript-go/internal/core.TryParsePattern +func TryParsePattern(pattern string) core.Pattern +type TypeAcquisition = core.TypeAcquisition +//go:linkname UTF16Len github.com/microsoft/typescript-go/internal/core.UTF16Len +func UTF16Len(s string) core.UTF16Offset +type UTF16Offset = core.UTF16Offset +//go:linkname UndefinedTextRange github.com/microsoft/typescript-go/internal/core.UndefinedTextRange +func UndefinedTextRange() core.TextRange +var UnprefixedNodeCoreModules = core.UnprefixedNodeCoreModules +//go:linkname Version github.com/microsoft/typescript-go/internal/core.Version +func Version() string +//go:linkname VersionMajorMinor github.com/microsoft/typescript-go/internal/core.VersionMajorMinor +func VersionMajorMinor() string +type WatchDirectoryKind = core.WatchDirectoryKind +const WatchDirectoryKindDynamicPriorityPolling = core.WatchDirectoryKindDynamicPriorityPolling +const WatchDirectoryKindFixedChunkSizePolling = core.WatchDirectoryKindFixedChunkSizePolling +const WatchDirectoryKindFixedPollingInterval = core.WatchDirectoryKindFixedPollingInterval +const WatchDirectoryKindNone = core.WatchDirectoryKindNone +const WatchDirectoryKindUseFsEvents = core.WatchDirectoryKindUseFsEvents +type WatchFileKind = core.WatchFileKind +const WatchFileKindDynamicPriorityPolling = core.WatchFileKindDynamicPriorityPolling +const WatchFileKindFixedChunkSizePolling = core.WatchFileKindFixedChunkSizePolling +const WatchFileKindFixedPollingInterval = core.WatchFileKindFixedPollingInterval +const WatchFileKindNone = core.WatchFileKindNone +const WatchFileKindPriorityPollingInterval = core.WatchFileKindPriorityPollingInterval +const WatchFileKindUseFsEvents = core.WatchFileKindUseFsEvents +const WatchFileKindUseFsEventsOnParentDirectory = core.WatchFileKindUseFsEventsOnParentDirectory +type WatchOptions = core.WatchOptions +//go:linkname WithRequestID github.com/microsoft/typescript-go/internal/core.WithRequestID +func WithRequestID(ctx context.Context, id string) context.Context +type WorkGroup = core.WorkGroup diff --git a/shim/parser/go.mod b/shim/parser/go.mod new file mode 100644 index 0000000..53b6a5c --- /dev/null +++ b/shim/parser/go.mod @@ -0,0 +1,14 @@ +module github.com/microsoft/typescript-go/shim/parser + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect +) diff --git a/shim/parser/go.sum b/shim/parser/go.sum new file mode 100644 index 0000000..2f20fff --- /dev/null +++ b/shim/parser/go.sum @@ -0,0 +1,24 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA= +github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/parser/shim.go b/shim/parser/shim.go new file mode 100644 index 0000000..1778bb5 --- /dev/null +++ b/shim/parser/shim.go @@ -0,0 +1,55 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package parser + +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/parser" +import _ "unsafe" + +//go:linkname GetJSDocCommentRanges github.com/microsoft/typescript-go/internal/parser.GetJSDocCommentRanges +func GetJSDocCommentRanges(f *ast.NodeFactory, commentRanges []ast.CommentRange, node *ast.Node, text string) []ast.CommentRange +type JSDocInfo = parser.JSDocInfo +const PCArgumentExpressions = parser.PCArgumentExpressions +const PCArrayBindingElements = parser.PCArrayBindingElements +const PCArrayLiteralMembers = parser.PCArrayLiteralMembers +const PCBlockStatements = parser.PCBlockStatements +const PCClassMembers = parser.PCClassMembers +const PCCount = parser.PCCount +const PCEnumMembers = parser.PCEnumMembers +const PCHeritageClauseElement = parser.PCHeritageClauseElement +const PCHeritageClauses = parser.PCHeritageClauses +const PCImportAttributes = parser.PCImportAttributes +const PCImportOrExportSpecifiers = parser.PCImportOrExportSpecifiers +const PCJSDocComment = parser.PCJSDocComment +const PCJSDocParameters = parser.PCJSDocParameters +const PCJsxAttributes = parser.PCJsxAttributes +const PCJsxChildren = parser.PCJsxChildren +const PCObjectBindingElements = parser.PCObjectBindingElements +const PCObjectLiteralMembers = parser.PCObjectLiteralMembers +const PCParameters = parser.PCParameters +const PCRestProperties = parser.PCRestProperties +const PCSourceElements = parser.PCSourceElements +const PCSwitchClauseStatements = parser.PCSwitchClauseStatements +const PCSwitchClauses = parser.PCSwitchClauses +const PCTupleElementTypes = parser.PCTupleElementTypes +const PCTypeArguments = parser.PCTypeArguments +const PCTypeMembers = parser.PCTypeMembers +const PCTypeParameters = parser.PCTypeParameters +const PCVariableDeclarations = parser.PCVariableDeclarations +type ParseFlags = parser.ParseFlags +const ParseFlagsAwait = parser.ParseFlagsAwait +const ParseFlagsIgnoreMissingOpenBrace = parser.ParseFlagsIgnoreMissingOpenBrace +const ParseFlagsJSDoc = parser.ParseFlagsJSDoc +const ParseFlagsNone = parser.ParseFlagsNone +const ParseFlagsType = parser.ParseFlagsType +const ParseFlagsYield = parser.ParseFlagsYield +//go:linkname ParseIsolatedEntityName github.com/microsoft/typescript-go/internal/parser.ParseIsolatedEntityName +func ParseIsolatedEntityName(text string) *ast.EntityName +//go:linkname ParseSourceFile github.com/microsoft/typescript-go/internal/parser.ParseSourceFile +func ParseSourceFile(opts ast.SourceFileParseOptions, sourceText string, scriptKind core.ScriptKind) *ast.SourceFile +type Parser = parser.Parser +type ParserState = parser.ParserState +type ParsingContext = parser.ParsingContext +type ParsingContexts = parser.ParsingContexts diff --git a/shim/scanner/go.mod b/shim/scanner/go.mod new file mode 100644 index 0000000..bdd5421 --- /dev/null +++ b/shim/scanner/go.mod @@ -0,0 +1,14 @@ +module github.com/microsoft/typescript-go/shim/scanner + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect +) diff --git a/shim/scanner/go.sum b/shim/scanner/go.sum new file mode 100644 index 0000000..327121e --- /dev/null +++ b/shim/scanner/go.sum @@ -0,0 +1,20 @@ +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/scanner/shim.go b/shim/scanner/shim.go new file mode 100644 index 0000000..27bfae6 --- /dev/null +++ b/shim/scanner/shim.go @@ -0,0 +1,96 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package scanner + +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/scanner" +import "iter" +import _ "unsafe" + +//go:linkname ComputeLineOfPosition github.com/microsoft/typescript-go/internal/scanner.ComputeLineOfPosition +func ComputeLineOfPosition(lineStarts []core.TextPos, pos int) int +//go:linkname ComputePositionOfLineAndByteOffset github.com/microsoft/typescript-go/internal/scanner.ComputePositionOfLineAndByteOffset +func ComputePositionOfLineAndByteOffset(lineStarts []core.TextPos, line int, byteOffset int) int +//go:linkname ComputePositionOfLineAndUTF16Character github.com/microsoft/typescript-go/internal/scanner.ComputePositionOfLineAndUTF16Character +func ComputePositionOfLineAndUTF16Character(lineStarts []core.TextPos, line int, character core.UTF16Offset, text string, allowEdits bool) int +//go:linkname DeclarationNameToString github.com/microsoft/typescript-go/internal/scanner.DeclarationNameToString +func DeclarationNameToString(name *ast.Node) string +type ErrorCallback = scanner.ErrorCallback +type EscapeSequenceScanningFlags = scanner.EscapeSequenceScanningFlags +const EscapeSequenceScanningFlagsAllowExtendedUnicodeEscape = scanner.EscapeSequenceScanningFlagsAllowExtendedUnicodeEscape +const EscapeSequenceScanningFlagsAnnexB = scanner.EscapeSequenceScanningFlagsAnnexB +const EscapeSequenceScanningFlagsAnyUnicodeMode = scanner.EscapeSequenceScanningFlagsAnyUnicodeMode +const EscapeSequenceScanningFlagsAtomEscape = scanner.EscapeSequenceScanningFlagsAtomEscape +const EscapeSequenceScanningFlagsRegularExpression = scanner.EscapeSequenceScanningFlagsRegularExpression +const EscapeSequenceScanningFlagsReportErrors = scanner.EscapeSequenceScanningFlagsReportErrors +const EscapeSequenceScanningFlagsReportInvalidEscapeErrors = scanner.EscapeSequenceScanningFlagsReportInvalidEscapeErrors +const EscapeSequenceScanningFlagsString = scanner.EscapeSequenceScanningFlagsString +//go:linkname GetECMAEndLinePosition github.com/microsoft/typescript-go/internal/scanner.GetECMAEndLinePosition +func GetECMAEndLinePosition(sourceFile *ast.SourceFile, line int) int +//go:linkname GetECMALineAndByteOffsetOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineAndByteOffsetOfPosition +func GetECMALineAndByteOffsetOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, byteOffset int) +//go:linkname GetECMALineAndUTF16CharacterOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineAndUTF16CharacterOfPosition +func GetECMALineAndUTF16CharacterOfPosition(sourceFile ast.SourceFileLike, pos int) (line int, character core.UTF16Offset) +//go:linkname GetECMALineOfPosition github.com/microsoft/typescript-go/internal/scanner.GetECMALineOfPosition +func GetECMALineOfPosition(sourceFile ast.SourceFileLike, pos int) int +//go:linkname GetECMALineStarts github.com/microsoft/typescript-go/internal/scanner.GetECMALineStarts +func GetECMALineStarts(sourceFile ast.SourceFileLike) []core.TextPos +//go:linkname GetECMAPositionOfLineAndByteOffset github.com/microsoft/typescript-go/internal/scanner.GetECMAPositionOfLineAndByteOffset +func GetECMAPositionOfLineAndByteOffset(sourceFile ast.SourceFileLike, line int, byteOffset int) int +//go:linkname GetECMAPositionOfLineAndUTF16Character github.com/microsoft/typescript-go/internal/scanner.GetECMAPositionOfLineAndUTF16Character +func GetECMAPositionOfLineAndUTF16Character(sourceFile ast.SourceFileLike, line int, character core.UTF16Offset) int +//go:linkname GetErrorRangeForNode github.com/microsoft/typescript-go/internal/scanner.GetErrorRangeForNode +func GetErrorRangeForNode(sourceFile *ast.SourceFile, node *ast.Node) core.TextRange +//go:linkname GetIdentifierToken github.com/microsoft/typescript-go/internal/scanner.GetIdentifierToken +func GetIdentifierToken(str string) ast.Kind +//go:linkname GetLeadingCommentRanges github.com/microsoft/typescript-go/internal/scanner.GetLeadingCommentRanges +func GetLeadingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] +//go:linkname GetRangeOfTokenAtPosition github.com/microsoft/typescript-go/internal/scanner.GetRangeOfTokenAtPosition +func GetRangeOfTokenAtPosition(sourceFile *ast.SourceFile, pos int) core.TextRange +//go:linkname GetScannerForSourceFile github.com/microsoft/typescript-go/internal/scanner.GetScannerForSourceFile +func GetScannerForSourceFile(sourceFile *ast.SourceFile, pos int) *scanner.Scanner +//go:linkname GetShebang github.com/microsoft/typescript-go/internal/scanner.GetShebang +func GetShebang(text string) string +//go:linkname GetSourceTextOfNodeFromSourceFile github.com/microsoft/typescript-go/internal/scanner.GetSourceTextOfNodeFromSourceFile +func GetSourceTextOfNodeFromSourceFile(sourceFile *ast.SourceFile, node *ast.Node, includeTrivia bool) string +//go:linkname GetTextOfNode github.com/microsoft/typescript-go/internal/scanner.GetTextOfNode +func GetTextOfNode(node *ast.Node) string +//go:linkname GetTextOfNodeFromSourceText github.com/microsoft/typescript-go/internal/scanner.GetTextOfNodeFromSourceText +func GetTextOfNodeFromSourceText(sourceText string, node *ast.Node, includeTrivia bool) string +//go:linkname GetTokenPosOfNode github.com/microsoft/typescript-go/internal/scanner.GetTokenPosOfNode +func GetTokenPosOfNode(node *ast.Node, sourceFile *ast.SourceFile, includeJSDoc bool) int +//go:linkname GetTrailingCommentRanges github.com/microsoft/typescript-go/internal/scanner.GetTrailingCommentRanges +func GetTrailingCommentRanges(f *ast.NodeFactory, text string, pos int) iter.Seq[ast.CommentRange] +//go:linkname GetViableKeywordSuggestions github.com/microsoft/typescript-go/internal/scanner.GetViableKeywordSuggestions +func GetViableKeywordSuggestions() []string +//go:linkname IdentifierToKeywordKind github.com/microsoft/typescript-go/internal/scanner.IdentifierToKeywordKind +func IdentifierToKeywordKind(node *ast.Identifier) ast.Kind +//go:linkname IsIdentifierPart github.com/microsoft/typescript-go/internal/scanner.IsIdentifierPart +func IsIdentifierPart(ch rune) bool +//go:linkname IsIdentifierPartEx github.com/microsoft/typescript-go/internal/scanner.IsIdentifierPartEx +func IsIdentifierPartEx(ch rune, languageVariant core.LanguageVariant) bool +//go:linkname IsIdentifierStart github.com/microsoft/typescript-go/internal/scanner.IsIdentifierStart +func IsIdentifierStart(ch rune) bool +//go:linkname IsIdentifierText github.com/microsoft/typescript-go/internal/scanner.IsIdentifierText +func IsIdentifierText(name string, languageVariant core.LanguageVariant) bool +//go:linkname IsIntrinsicJsxName github.com/microsoft/typescript-go/internal/scanner.IsIntrinsicJsxName +func IsIntrinsicJsxName(name string) bool +//go:linkname IsValidIdentifier github.com/microsoft/typescript-go/internal/scanner.IsValidIdentifier +func IsValidIdentifier(s string) bool +//go:linkname NewScanner github.com/microsoft/typescript-go/internal/scanner.NewScanner +func NewScanner() *scanner.Scanner +//go:linkname ScanTokenAtPosition github.com/microsoft/typescript-go/internal/scanner.ScanTokenAtPosition +func ScanTokenAtPosition(sourceFile *ast.SourceFile, pos int) ast.Kind +type Scanner = scanner.Scanner +type ScannerState = scanner.ScannerState +//go:linkname SkipTrivia github.com/microsoft/typescript-go/internal/scanner.SkipTrivia +func SkipTrivia(text string, pos int) int +//go:linkname SkipTriviaEx github.com/microsoft/typescript-go/internal/scanner.SkipTriviaEx +func SkipTriviaEx(text string, pos int, options *scanner.SkipTriviaOptions) int +type SkipTriviaOptions = scanner.SkipTriviaOptions +//go:linkname StringToToken github.com/microsoft/typescript-go/internal/scanner.StringToToken +func StringToToken(s string) ast.Kind +//go:linkname TokenToString github.com/microsoft/typescript-go/internal/scanner.TokenToString +func TokenToString(token ast.Kind) string diff --git a/shim/tsoptions/extra-shim.json b/shim/tsoptions/extra-shim.json new file mode 100644 index 0000000..4d7294b --- /dev/null +++ b/shim/tsoptions/extra-shim.json @@ -0,0 +1,7 @@ +{ + "IgnoreFunctions": [ + "GetSupportedExtensions", + "ParseJsonConfigFileContent", + "ParseJsonSourceFileConfigFileContent" + ] +} diff --git a/shim/tsoptions/go.mod b/shim/tsoptions/go.mod new file mode 100644 index 0000000..68fb0bc --- /dev/null +++ b/shim/tsoptions/go.mod @@ -0,0 +1,15 @@ +module github.com/microsoft/typescript-go/shim/tsoptions + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + github.com/klauspost/cpuid/v2 v2.2.10 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect + golang.org/x/text v0.34.0 // indirect +) diff --git a/shim/tsoptions/go.sum b/shim/tsoptions/go.sum new file mode 100644 index 0000000..2f20fff --- /dev/null +++ b/shim/tsoptions/go.sum @@ -0,0 +1,24 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE= +github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +github.com/peter-evans/patience v0.3.0 h1:rX0JdJeepqdQl1Sk9c9uvorjYYzL2TfgLX1adqYm9cA= +github.com/peter-evans/patience v0.3.0/go.mod h1:Kmxu5sY1NmBLFSStvXjX1wS9mIv7wMcP/ubucyMOAu0= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.34.0 h1:oL/Qq0Kdaqxa1KbNeMKwQq0reLCCaFtqu2eNuSeNHbk= +golang.org/x/text v0.34.0/go.mod h1:homfLqTYRFyVYemLBFl5GgL/DWEiH5wcsQ5gSh1yziA= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/tsoptions/shim.go b/shim/tsoptions/shim.go new file mode 100644 index 0000000..6a3f187 --- /dev/null +++ b/shim/tsoptions/shim.go @@ -0,0 +1,118 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package tsoptions + +import "github.com/microsoft/typescript-go/internal/ast" +import "github.com/microsoft/typescript-go/internal/collections" +import "github.com/microsoft/typescript-go/internal/core" +import "github.com/microsoft/typescript-go/internal/diagnostics" +import "github.com/microsoft/typescript-go/internal/tsoptions" +import "github.com/microsoft/typescript-go/internal/tspath" +import "reflect" +import _ "unsafe" + +type AlternateModeDiagnostics = tsoptions.AlternateModeDiagnostics +var BuildNameMap = tsoptions.BuildNameMap +var BuildOpts = tsoptions.BuildOpts +var CommandLineCompilerOptionsMap = tsoptions.CommandLineCompilerOptionsMap +type CommandLineOption = tsoptions.CommandLineOption +type CommandLineOptionKind = tsoptions.CommandLineOptionKind +type CommandLineOptionNameMap = tsoptions.CommandLineOptionNameMap +const CommandLineOptionTypeBoolean = tsoptions.CommandLineOptionTypeBoolean +const CommandLineOptionTypeEnum = tsoptions.CommandLineOptionTypeEnum +const CommandLineOptionTypeList = tsoptions.CommandLineOptionTypeList +const CommandLineOptionTypeListOrElement = tsoptions.CommandLineOptionTypeListOrElement +const CommandLineOptionTypeNumber = tsoptions.CommandLineOptionTypeNumber +const CommandLineOptionTypeObject = tsoptions.CommandLineOptionTypeObject +const CommandLineOptionTypeString = tsoptions.CommandLineOptionTypeString +var CompilerNameMap = tsoptions.CompilerNameMap +//go:linkname CompilerOptionsAffectDeclarationPath github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectDeclarationPath +func CompilerOptionsAffectDeclarationPath(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool +//go:linkname CompilerOptionsAffectEmit github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectEmit +func CompilerOptionsAffectEmit(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool +//go:linkname CompilerOptionsAffectSemanticDiagnostics github.com/microsoft/typescript-go/internal/tsoptions.CompilerOptionsAffectSemanticDiagnostics +func CompilerOptionsAffectSemanticDiagnostics(oldOptions *core.CompilerOptions, newOptions *core.CompilerOptions) bool +var CompilerOptionsDidYouMeanDiagnostics = tsoptions.CompilerOptionsDidYouMeanDiagnostics +type CompilerOptionsValue = tsoptions.CompilerOptionsValue +//go:linkname ConvertOptionToAbsolutePath github.com/microsoft/typescript-go/internal/tsoptions.ConvertOptionToAbsolutePath +func ConvertOptionToAbsolutePath(o string, v any, optionMap tsoptions.CommandLineOptionNameMap, cwd string) (any, bool) +//go:linkname ConvertToTSConfig github.com/microsoft/typescript-go/internal/tsoptions.ConvertToTSConfig +func ConvertToTSConfig(configParseResult *tsoptions.ParsedCommandLine, configFileName string) *tsoptions.TSConfig +//go:linkname CreateDiagnosticAtReferenceSyntax github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticAtReferenceSyntax +func CreateDiagnosticAtReferenceSyntax(config *tsoptions.ParsedCommandLine, index int, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname CreateDiagnosticForNodeInSourceFile github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticForNodeInSourceFile +func CreateDiagnosticForNodeInSourceFile(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic +//go:linkname CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic github.com/microsoft/typescript-go/internal/tsoptions.CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic +func CreateDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile *ast.SourceFile, node *ast.Node, message *diagnostics.Message, args ...any) *ast.Diagnostic +type DidYouMeanOptionsDiagnostics = tsoptions.DidYouMeanOptionsDiagnostics +type ExtendedConfigCache = tsoptions.ExtendedConfigCache +type ExtendedConfigCacheEntry = tsoptions.ExtendedConfigCacheEntry +type FileExtensionInfo = tsoptions.FileExtensionInfo +//go:linkname ForEachCompilerOptionValue github.com/microsoft/typescript-go/internal/tsoptions.ForEachCompilerOptionValue +func ForEachCompilerOptionValue(options *core.CompilerOptions, declFilter func(*tsoptions.CommandLineOption) bool, fn func(option *tsoptions.CommandLineOption, value reflect.Value, i int) bool) bool +//go:linkname GetCallbackForFindingPropertyAssignmentByValue github.com/microsoft/typescript-go/internal/tsoptions.GetCallbackForFindingPropertyAssignmentByValue +func GetCallbackForFindingPropertyAssignmentByValue(value string) func(property *ast.PropertyAssignment) *ast.Node +//go:linkname GetDefaultLibFileName github.com/microsoft/typescript-go/internal/tsoptions.GetDefaultLibFileName +func GetDefaultLibFileName(options *core.CompilerOptions) string +//go:linkname GetLibFileName github.com/microsoft/typescript-go/internal/tsoptions.GetLibFileName +func GetLibFileName(libName string) (string, bool) +//go:linkname GetNameMapFromList github.com/microsoft/typescript-go/internal/tsoptions.GetNameMapFromList +func GetNameMapFromList(optDecls []*tsoptions.CommandLineOption) *tsoptions.NameMap +//go:linkname GetOptionsSyntaxByArrayElementValue github.com/microsoft/typescript-go/internal/tsoptions.GetOptionsSyntaxByArrayElementValue +func GetOptionsSyntaxByArrayElementValue(objectLiteral *ast.ObjectLiteralExpression, propKey string, elementValue string) *ast.Node +//go:linkname GetParsedCommandLineOfConfigFile github.com/microsoft/typescript-go/internal/tsoptions.GetParsedCommandLineOfConfigFile +func GetParsedCommandLineOfConfigFile(configFileName string, options *core.CompilerOptions, optionsRaw *collections.OrderedMap[string, any], sys tsoptions.ParseConfigHost, extendedConfigCache tsoptions.ExtendedConfigCache) (*tsoptions.ParsedCommandLine, []*ast.Diagnostic) +//go:linkname GetParsedCommandLineOfConfigFilePath github.com/microsoft/typescript-go/internal/tsoptions.GetParsedCommandLineOfConfigFilePath +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) +//go:linkname GetSupportedExtensionsWithJsonIfResolveJsonModule github.com/microsoft/typescript-go/internal/tsoptions.GetSupportedExtensionsWithJsonIfResolveJsonModule +func GetSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions *core.CompilerOptions, supportedExtensions [][]string) [][]string +//go:linkname GetTsConfigPropArrayElementValue github.com/microsoft/typescript-go/internal/tsoptions.GetTsConfigPropArrayElementValue +func GetTsConfigPropArrayElementValue(tsConfigSourceFile *ast.SourceFile, propKey string, elementValue string) *ast.StringLiteral +var InverseJsxOptionMap = tsoptions.InverseJsxOptionMap +var LibFilesSet = tsoptions.LibFilesSet +var LibMap = tsoptions.LibMap +var Libs = tsoptions.Libs +type NameMap = tsoptions.NameMap +//go:linkname NewParsedCommandLine github.com/microsoft/typescript-go/internal/tsoptions.NewParsedCommandLine +func NewParsedCommandLine(compilerOptions *core.CompilerOptions, rootFileNames []string, comparePathsOptions tspath.ComparePathsOptions) *tsoptions.ParsedCommandLine +//go:linkname NewTsconfigSourceFileFromFilePath github.com/microsoft/typescript-go/internal/tsoptions.NewTsconfigSourceFileFromFilePath +func NewTsconfigSourceFileFromFilePath(configFileName string, configPath tspath.Path, configSourceText string) *tsoptions.TsConfigSourceFile +var OptionsDeclarations = tsoptions.OptionsDeclarations +var OptionsForBuild = tsoptions.OptionsForBuild +var OptionsForWatch = tsoptions.OptionsForWatch +//go:linkname ParseBuildCommandLine github.com/microsoft/typescript-go/internal/tsoptions.ParseBuildCommandLine +func ParseBuildCommandLine(commandLine []string, host tsoptions.ParseConfigHost) *tsoptions.ParsedBuildCommandLine +//go:linkname ParseBuildOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseBuildOptions +func ParseBuildOptions(key string, value any, allOptions *core.BuildOptions) []*ast.Diagnostic +//go:linkname ParseCommandLine github.com/microsoft/typescript-go/internal/tsoptions.ParseCommandLine +func ParseCommandLine(commandLine []string, host tsoptions.ParseConfigHost) *tsoptions.ParsedCommandLine +type ParseCommandLineWorkerDiagnostics = tsoptions.ParseCommandLineWorkerDiagnostics +//go:linkname ParseCompilerOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseCompilerOptions +func ParseCompilerOptions(key string, value any, allOptions *core.CompilerOptions) []*ast.Diagnostic +//go:linkname ParseConfigFileTextToJson github.com/microsoft/typescript-go/internal/tsoptions.ParseConfigFileTextToJson +func ParseConfigFileTextToJson(fileName string, path tspath.Path, jsonText string) (any, []*ast.Diagnostic) +type ParseConfigHost = tsoptions.ParseConfigHost +//go:linkname ParseExtendedConfig github.com/microsoft/typescript-go/internal/tsoptions.ParseExtendedConfig +func ParseExtendedConfig(fileName string, path tspath.Path, resolutionStack []string, host tsoptions.ParseConfigHost, extendedConfigCache tsoptions.ExtendedConfigCache) *tsoptions.ExtendedConfigCacheEntry +//go:linkname ParseListTypeOption github.com/microsoft/typescript-go/internal/tsoptions.ParseListTypeOption +func ParseListTypeOption(opt *tsoptions.CommandLineOption, value string) ([]any, []*ast.Diagnostic) +//go:linkname ParseString github.com/microsoft/typescript-go/internal/tsoptions.ParseString +func ParseString(value any) string +//go:linkname ParseStringArray github.com/microsoft/typescript-go/internal/tsoptions.ParseStringArray +func ParseStringArray(value any) []string +//go:linkname ParseTristate github.com/microsoft/typescript-go/internal/tsoptions.ParseTristate +func ParseTristate(value any) core.Tristate +//go:linkname ParseTypeAcquisition github.com/microsoft/typescript-go/internal/tsoptions.ParseTypeAcquisition +func ParseTypeAcquisition(key string, value any, allOptions *core.TypeAcquisition) []*ast.Diagnostic +//go:linkname ParseWatchOptions github.com/microsoft/typescript-go/internal/tsoptions.ParseWatchOptions +func ParseWatchOptions(key string, value any, allOptions *core.WatchOptions) []*ast.Diagnostic +type ParsedBuildCommandLine = tsoptions.ParsedBuildCommandLine +type ParsedCommandLine = tsoptions.ParsedCommandLine +type SourceOutputAndProjectReference = tsoptions.SourceOutputAndProjectReference +type TSConfig = tsoptions.TSConfig +//go:linkname TargetToLibMap github.com/microsoft/typescript-go/internal/tsoptions.TargetToLibMap +func TargetToLibMap() map[core.ScriptTarget]string +type TsConfigSourceFile = tsoptions.TsConfigSourceFile +var TscBuildOption = tsoptions.TscBuildOption +var WatchNameMap = tsoptions.WatchNameMap diff --git a/shim/tspath/go.mod b/shim/tspath/go.mod new file mode 100644 index 0000000..ef0af52 --- /dev/null +++ b/shim/tspath/go.mod @@ -0,0 +1,5 @@ +module github.com/microsoft/typescript-go/shim/tspath + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d diff --git a/shim/tspath/go.sum b/shim/tspath/go.sum new file mode 100644 index 0000000..9cc24c8 --- /dev/null +++ b/shim/tspath/go.sum @@ -0,0 +1,6 @@ +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/tspath/shim.go b/shim/tspath/shim.go new file mode 100644 index 0000000..821a6c7 --- /dev/null +++ b/shim/tspath/shim.go @@ -0,0 +1,165 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package tspath + +import "github.com/microsoft/typescript-go/internal/tspath" +import _ "unsafe" + +var AllSupportedExtensions = tspath.AllSupportedExtensions +var AllSupportedExtensionsWithJson = tspath.AllSupportedExtensionsWithJson +//go:linkname ChangeAnyExtension github.com/microsoft/typescript-go/internal/tspath.ChangeAnyExtension +func ChangeAnyExtension(path string, ext string, extensions []string, ignoreCase bool) string +//go:linkname ChangeExtension github.com/microsoft/typescript-go/internal/tspath.ChangeExtension +func ChangeExtension(path string, newExtension string) string +//go:linkname ChangeFullExtension github.com/microsoft/typescript-go/internal/tspath.ChangeFullExtension +func ChangeFullExtension(path string, newExtension string) string +//go:linkname CombinePaths github.com/microsoft/typescript-go/internal/tspath.CombinePaths +func CombinePaths(firstPath string, paths ...string) string +//go:linkname CompareNumberOfDirectorySeparators github.com/microsoft/typescript-go/internal/tspath.CompareNumberOfDirectorySeparators +func CompareNumberOfDirectorySeparators(path1 string, path2 string) int +//go:linkname ComparePaths github.com/microsoft/typescript-go/internal/tspath.ComparePaths +func ComparePaths(a string, b string, options tspath.ComparePathsOptions) int +//go:linkname ComparePathsCaseInsensitive github.com/microsoft/typescript-go/internal/tspath.ComparePathsCaseInsensitive +func ComparePathsCaseInsensitive(a string, b string, currentDirectory string) int +//go:linkname ComparePathsCaseSensitive github.com/microsoft/typescript-go/internal/tspath.ComparePathsCaseSensitive +func ComparePathsCaseSensitive(a string, b string, currentDirectory string) int +type ComparePathsOptions = tspath.ComparePathsOptions +//go:linkname ContainsIgnoredPath github.com/microsoft/typescript-go/internal/tspath.ContainsIgnoredPath +func ContainsIgnoredPath(path string) bool +//go:linkname ContainsPath github.com/microsoft/typescript-go/internal/tspath.ContainsPath +func ContainsPath(parent string, child string, options tspath.ComparePathsOptions) bool +//go:linkname ConvertToRelativePath github.com/microsoft/typescript-go/internal/tspath.ConvertToRelativePath +func ConvertToRelativePath(absoluteOrRelativePath string, options tspath.ComparePathsOptions) string +const DirectorySeparator = tspath.DirectorySeparator +//go:linkname EnsurePathIsNonModuleName github.com/microsoft/typescript-go/internal/tspath.EnsurePathIsNonModuleName +func EnsurePathIsNonModuleName(path string) string +//go:linkname EnsureTrailingDirectorySeparator github.com/microsoft/typescript-go/internal/tspath.EnsureTrailingDirectorySeparator +func EnsureTrailingDirectorySeparator(path string) string +const ExtensionCjs = tspath.ExtensionCjs +const ExtensionCts = tspath.ExtensionCts +const ExtensionDcts = tspath.ExtensionDcts +const ExtensionDmts = tspath.ExtensionDmts +const ExtensionDts = tspath.ExtensionDts +//go:linkname ExtensionIsOneOf github.com/microsoft/typescript-go/internal/tspath.ExtensionIsOneOf +func ExtensionIsOneOf(ext string, extensions []string) bool +//go:linkname ExtensionIsTs github.com/microsoft/typescript-go/internal/tspath.ExtensionIsTs +func ExtensionIsTs(ext string) bool +const ExtensionJs = tspath.ExtensionJs +const ExtensionJson = tspath.ExtensionJson +const ExtensionJsx = tspath.ExtensionJsx +const ExtensionMjs = tspath.ExtensionMjs +const ExtensionMts = tspath.ExtensionMts +const ExtensionTs = tspath.ExtensionTs +const ExtensionTsBuildInfo = tspath.ExtensionTsBuildInfo +const ExtensionTsx = tspath.ExtensionTsx +var ExtensionsNotSupportingExtensionlessResolution = tspath.ExtensionsNotSupportingExtensionlessResolution +//go:linkname FileExtensionIs github.com/microsoft/typescript-go/internal/tspath.FileExtensionIs +func FileExtensionIs(path string, extension string) bool +//go:linkname FileExtensionIsOneOf github.com/microsoft/typescript-go/internal/tspath.FileExtensionIsOneOf +func FileExtensionIsOneOf(path string, extensions []string) bool +//go:linkname GetAnyExtensionFromPath github.com/microsoft/typescript-go/internal/tspath.GetAnyExtensionFromPath +func GetAnyExtensionFromPath(path string, extensions []string, ignoreCase bool) string +//go:linkname GetBaseFileName github.com/microsoft/typescript-go/internal/tspath.GetBaseFileName +func GetBaseFileName(path string) string +//go:linkname GetCanonicalFileName github.com/microsoft/typescript-go/internal/tspath.GetCanonicalFileName +func GetCanonicalFileName(fileName string, useCaseSensitiveFileNames bool) string +//go:linkname GetCommonParents github.com/microsoft/typescript-go/internal/tspath.GetCommonParents +func GetCommonParents(paths []string, minComponents int, getPathComponents func(path string, currentDirectory string) []string, options tspath.ComparePathsOptions) (parents []string, ignored map[string]struct{}) +//go:linkname GetDeclarationEmitExtensionForPath github.com/microsoft/typescript-go/internal/tspath.GetDeclarationEmitExtensionForPath +func GetDeclarationEmitExtensionForPath(path string) string +//go:linkname GetDeclarationFileExtension github.com/microsoft/typescript-go/internal/tspath.GetDeclarationFileExtension +func GetDeclarationFileExtension(fileName string) string +//go:linkname GetDirectoryPath github.com/microsoft/typescript-go/internal/tspath.GetDirectoryPath +func GetDirectoryPath(path string) string +//go:linkname GetEncodedRootLength github.com/microsoft/typescript-go/internal/tspath.GetEncodedRootLength +func GetEncodedRootLength(path string) int +//go:linkname GetNormalizedAbsolutePath github.com/microsoft/typescript-go/internal/tspath.GetNormalizedAbsolutePath +func GetNormalizedAbsolutePath(fileName string, currentDirectory string) string +//go:linkname GetNormalizedAbsolutePathWithoutRoot github.com/microsoft/typescript-go/internal/tspath.GetNormalizedAbsolutePathWithoutRoot +func GetNormalizedAbsolutePathWithoutRoot(fileName string, currentDirectory string) string +//go:linkname GetNormalizedPathComponents github.com/microsoft/typescript-go/internal/tspath.GetNormalizedPathComponents +func GetNormalizedPathComponents(path string, currentDirectory string) []string +//go:linkname GetPathComponents github.com/microsoft/typescript-go/internal/tspath.GetPathComponents +func GetPathComponents(path string, currentDirectory string) []string +//go:linkname GetPathComponentsRelativeTo github.com/microsoft/typescript-go/internal/tspath.GetPathComponentsRelativeTo +func GetPathComponentsRelativeTo(from string, to string, options tspath.ComparePathsOptions) []string +//go:linkname GetPathFromPathComponents github.com/microsoft/typescript-go/internal/tspath.GetPathFromPathComponents +func GetPathFromPathComponents(pathComponents []string) string +//go:linkname GetPossibleOriginalInputExtensionForExtension github.com/microsoft/typescript-go/internal/tspath.GetPossibleOriginalInputExtensionForExtension +func GetPossibleOriginalInputExtensionForExtension(path string) []string +//go:linkname GetRelativePathFromDirectory github.com/microsoft/typescript-go/internal/tspath.GetRelativePathFromDirectory +func GetRelativePathFromDirectory(fromDirectory string, to string, options tspath.ComparePathsOptions) string +//go:linkname GetRelativePathFromFile github.com/microsoft/typescript-go/internal/tspath.GetRelativePathFromFile +func GetRelativePathFromFile(from string, to string, options tspath.ComparePathsOptions) string +//go:linkname GetRelativePathToDirectoryOrUrl github.com/microsoft/typescript-go/internal/tspath.GetRelativePathToDirectoryOrUrl +func GetRelativePathToDirectoryOrUrl(directoryPathOrUrl string, relativeOrAbsolutePath string, isAbsolutePathAnUrl bool, options tspath.ComparePathsOptions) string +//go:linkname GetRootLength github.com/microsoft/typescript-go/internal/tspath.GetRootLength +func GetRootLength(path string) int +//go:linkname HasExtension github.com/microsoft/typescript-go/internal/tspath.HasExtension +func HasExtension(fileName string) bool +//go:linkname HasImplementationTSFileExtension github.com/microsoft/typescript-go/internal/tspath.HasImplementationTSFileExtension +func HasImplementationTSFileExtension(path string) bool +//go:linkname HasJSFileExtension github.com/microsoft/typescript-go/internal/tspath.HasJSFileExtension +func HasJSFileExtension(path string) bool +//go:linkname HasJSONFileExtension github.com/microsoft/typescript-go/internal/tspath.HasJSONFileExtension +func HasJSONFileExtension(path string) bool +//go:linkname HasTSFileExtension github.com/microsoft/typescript-go/internal/tspath.HasTSFileExtension +func HasTSFileExtension(path string) bool +//go:linkname HasTrailingDirectorySeparator github.com/microsoft/typescript-go/internal/tspath.HasTrailingDirectorySeparator +func HasTrailingDirectorySeparator(path string) bool +//go:linkname IsDeclarationFileName github.com/microsoft/typescript-go/internal/tspath.IsDeclarationFileName +func IsDeclarationFileName(fileName string) bool +//go:linkname IsDiskPathRoot github.com/microsoft/typescript-go/internal/tspath.IsDiskPathRoot +func IsDiskPathRoot(path string) bool +//go:linkname IsDynamicFileName github.com/microsoft/typescript-go/internal/tspath.IsDynamicFileName +func IsDynamicFileName(fileName string) bool +//go:linkname IsExternalModuleNameRelative github.com/microsoft/typescript-go/internal/tspath.IsExternalModuleNameRelative +func IsExternalModuleNameRelative(moduleName string) bool +//go:linkname IsRootedDiskPath github.com/microsoft/typescript-go/internal/tspath.IsRootedDiskPath +func IsRootedDiskPath(path string) bool +//go:linkname IsUrl github.com/microsoft/typescript-go/internal/tspath.IsUrl +func IsUrl(path string) bool +//go:linkname IsVolumeCharacter github.com/microsoft/typescript-go/internal/tspath.IsVolumeCharacter +func IsVolumeCharacter(char byte) bool +//go:linkname NormalizePath github.com/microsoft/typescript-go/internal/tspath.NormalizePath +func NormalizePath(path string) string +//go:linkname NormalizeSlashes github.com/microsoft/typescript-go/internal/tspath.NormalizeSlashes +func NormalizeSlashes(path string) string +type Path = tspath.Path +//go:linkname PathIsAbsolute github.com/microsoft/typescript-go/internal/tspath.PathIsAbsolute +func PathIsAbsolute(path string) bool +//go:linkname PathIsRelative github.com/microsoft/typescript-go/internal/tspath.PathIsRelative +func PathIsRelative(path string) bool +//go:linkname RemoveExtension github.com/microsoft/typescript-go/internal/tspath.RemoveExtension +func RemoveExtension(path string, extension string) string +//go:linkname RemoveFileExtension github.com/microsoft/typescript-go/internal/tspath.RemoveFileExtension +func RemoveFileExtension(path string) string +//go:linkname RemoveTrailingDirectorySeparator github.com/microsoft/typescript-go/internal/tspath.RemoveTrailingDirectorySeparator +func RemoveTrailingDirectorySeparator(path string) string +//go:linkname RemoveTrailingDirectorySeparators github.com/microsoft/typescript-go/internal/tspath.RemoveTrailingDirectorySeparators +func RemoveTrailingDirectorySeparators(path string) string +//go:linkname ResolvePath github.com/microsoft/typescript-go/internal/tspath.ResolvePath +func ResolvePath(path string, paths ...string) string +//go:linkname ResolveTripleslashReference github.com/microsoft/typescript-go/internal/tspath.ResolveTripleslashReference +func ResolveTripleslashReference(moduleName string, containingFile string) string +//go:linkname SplitVolumePath github.com/microsoft/typescript-go/internal/tspath.SplitVolumePath +func SplitVolumePath(path string) (volume string, rest string, ok bool) +//go:linkname StartsWithDirectory github.com/microsoft/typescript-go/internal/tspath.StartsWithDirectory +func StartsWithDirectory(fileName string, directoryName string, useCaseSensitiveFileNames bool) bool +var SupportedDeclarationExtensions = tspath.SupportedDeclarationExtensions +var SupportedJSExtensions = tspath.SupportedJSExtensions +var SupportedJSExtensionsFlat = tspath.SupportedJSExtensionsFlat +var SupportedTSExtensions = tspath.SupportedTSExtensions +var SupportedTSExtensionsFlat = tspath.SupportedTSExtensionsFlat +var SupportedTSExtensionsWithJson = tspath.SupportedTSExtensionsWithJson +var SupportedTSExtensionsWithJsonFlat = tspath.SupportedTSExtensionsWithJsonFlat +var SupportedTSImplementationExtensions = tspath.SupportedTSImplementationExtensions +//go:linkname ToFileNameLowerCase github.com/microsoft/typescript-go/internal/tspath.ToFileNameLowerCase +func ToFileNameLowerCase(fileName string) string +//go:linkname ToPath github.com/microsoft/typescript-go/internal/tspath.ToPath +func ToPath(fileName string, basePath string, useCaseSensitiveFileNames bool) tspath.Path +//go:linkname TryExtractTSExtension github.com/microsoft/typescript-go/internal/tspath.TryExtractTSExtension +func TryExtractTSExtension(fileName string) string +//go:linkname TryGetExtensionFromPath github.com/microsoft/typescript-go/internal/tspath.TryGetExtensionFromPath +func TryGetExtensionFromPath(p string) string diff --git a/shim/vfs/cachedvfs/go.mod b/shim/vfs/cachedvfs/go.mod new file mode 100644 index 0000000..cd61902 --- /dev/null +++ b/shim/vfs/cachedvfs/go.mod @@ -0,0 +1,11 @@ +module github.com/microsoft/typescript-go/shim/vfs/cachedvfs + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + golang.org/x/sync v0.19.0 // indirect +) diff --git a/shim/vfs/cachedvfs/go.sum b/shim/vfs/cachedvfs/go.sum new file mode 100644 index 0000000..0e13f6e --- /dev/null +++ b/shim/vfs/cachedvfs/go.sum @@ -0,0 +1,14 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/vfs/cachedvfs/shim.go b/shim/vfs/cachedvfs/shim.go new file mode 100644 index 0000000..1794cd6 --- /dev/null +++ b/shim/vfs/cachedvfs/shim.go @@ -0,0 +1,12 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package cachedvfs + +import "github.com/microsoft/typescript-go/internal/vfs" +import "github.com/microsoft/typescript-go/internal/vfs/cachedvfs" +import _ "unsafe" + +type FS = cachedvfs.FS +//go:linkname From github.com/microsoft/typescript-go/internal/vfs/cachedvfs.From +func From(fs vfs.FS) *cachedvfs.FS diff --git a/shim/vfs/extra-shim.json b/shim/vfs/extra-shim.json new file mode 100644 index 0000000..805d3ae --- /dev/null +++ b/shim/vfs/extra-shim.json @@ -0,0 +1,7 @@ +{ + "IgnoreFunctions": [ + "GetPatternFromSpec", + "GetRegularExpressionForWildcard", + "GetRegularExpressionsForWildcards" + ] +} diff --git a/shim/vfs/go.mod b/shim/vfs/go.mod new file mode 100644 index 0000000..afa0467 --- /dev/null +++ b/shim/vfs/go.mod @@ -0,0 +1,13 @@ +module github.com/microsoft/typescript-go/shim/vfs + +go 1.26 + +require ( + github.com/dlclark/regexp2 v1.11.5 + github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d +) + +require ( + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + golang.org/x/sync v0.19.0 // indirect +) diff --git a/shim/vfs/go.sum b/shim/vfs/go.sum new file mode 100644 index 0000000..0e13f6e --- /dev/null +++ b/shim/vfs/go.sum @@ -0,0 +1,14 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/vfs/osvfs/go.mod b/shim/vfs/osvfs/go.mod new file mode 100644 index 0000000..e380295 --- /dev/null +++ b/shim/vfs/osvfs/go.mod @@ -0,0 +1,12 @@ +module github.com/microsoft/typescript-go/shim/vfs/osvfs + +go 1.26 + +require github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d + +require ( + github.com/dlclark/regexp2 v1.11.5 // indirect + github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 // indirect + golang.org/x/sync v0.19.0 // indirect + golang.org/x/sys v0.41.0 // indirect +) diff --git a/shim/vfs/osvfs/go.sum b/shim/vfs/osvfs/go.sum new file mode 100644 index 0000000..0e13f6e --- /dev/null +++ b/shim/vfs/osvfs/go.sum @@ -0,0 +1,14 @@ +github.com/dlclark/regexp2 v1.11.5 h1:Q/sSnsKerHeCkc/jSTNq1oCm7KiVgUMZRDUoRu0JQZQ= +github.com/dlclark/regexp2 v1.11.5/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433 h1:vymEbVwYFP/L05h5TKQxvkXoKxNvTpjxYKdF1Nlwuao= +github.com/go-json-experiment/json v0.0.0-20260214004413-d219187c3433/go.mod h1:tphK2c80bpPhMOI4v6bIc2xWywPfbqi1Z06+RcrMkDg= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d h1:TF9iuMrjoNGAQit8uNPcI1VxHqO/ewAQZlhGNei7kTY= +github.com/microsoft/typescript-go v0.0.0-20260309214900-4a59cd78390d/go.mod h1:GO2o1f4S8ffXDYq+wXWUPwDcyulNVCy0JnU6u6+qK0U= +golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= +golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k= +golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +gotest.tools/v3 v3.5.2 h1:7koQfIKdy+I8UTetycgUqXWSDwpgv193Ka+qRsmBY8Q= +gotest.tools/v3 v3.5.2/go.mod h1:LtdLGcnqToBH83WByAAi/wiwSFCArdFIUV/xxN4pcjA= diff --git a/shim/vfs/osvfs/shim.go b/shim/vfs/osvfs/shim.go new file mode 100644 index 0000000..51663a7 --- /dev/null +++ b/shim/vfs/osvfs/shim.go @@ -0,0 +1,13 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package osvfs + +import "github.com/microsoft/typescript-go/internal/vfs" +import _ "github.com/microsoft/typescript-go/internal/vfs/osvfs" +import _ "unsafe" + +//go:linkname FS github.com/microsoft/typescript-go/internal/vfs/osvfs.FS +func FS() vfs.FS +//go:linkname GetGlobalTypingsCacheLocation github.com/microsoft/typescript-go/internal/vfs/osvfs.GetGlobalTypingsCacheLocation +func GetGlobalTypingsCacheLocation() string diff --git a/shim/vfs/shim.go b/shim/vfs/shim.go new file mode 100644 index 0000000..f4f8fe7 --- /dev/null +++ b/shim/vfs/shim.go @@ -0,0 +1,19 @@ + +// Code generated by tools/gen_shims. DO NOT EDIT. + +package vfs + +import "github.com/microsoft/typescript-go/internal/vfs" + +type DirEntry = vfs.DirEntry +type Entries = vfs.Entries +var ErrClosed = vfs.ErrClosed +var ErrExist = vfs.ErrExist +var ErrInvalid = vfs.ErrInvalid +var ErrNotExist = vfs.ErrNotExist +var ErrPermission = vfs.ErrPermission +type FS = vfs.FS +type FileInfo = vfs.FileInfo +var SkipAll = vfs.SkipAll +var SkipDir = vfs.SkipDir +type WalkDirFunc = vfs.WalkDirFunc diff --git a/tools/gen_shims/main.go b/tools/gen_shims/main.go new file mode 100644 index 0000000..f3b3c08 --- /dev/null +++ b/tools/gen_shims/main.go @@ -0,0 +1,424 @@ +package main + +import ( + "bytes" + "fmt" + "go/types" + "log" + "maps" + "os" + "path" + "slices" + "strings" + + "github.com/go-json-experiment/json" + + "golang.org/x/text/cases" + "golang.org/x/text/language" + "golang.org/x/tools/go/packages" +) + +const tsgoInternalPrefix = "github.com/microsoft/typescript-go/internal/" + +func signatureHasUnexportedType(t types.Signature) bool { + if params := t.Params(); params != nil { + for v := range params.Variables() { + ty := v.Type() + + if ptrType, ok := ty.(*types.Pointer); ok { + ty = ptrType.Elem() + } + if named, ok := ty.(*types.Named); ok { + if !named.Obj().Exported() { + return true + } + } + } + } + return false +} + +type ExtraShim struct { + ExtraFunctions []string + ExtraMethods map[string]([]string) + ExtraFields map[string]([]string) + IgnoreFunctions []string +} + +func main() { + packagesToShim := []string{ + "ast", + "bundled", + "checker", + "compiler", + "core", + "parser", + "scanner", + "tsoptions", + "tspath", + "vfs", + "vfs/cachedvfs", + "vfs/osvfs", + } + + packagesToShimFullNames := make([]string, len(packagesToShim)) + for i, pkg := range packagesToShim { + packagesToShimFullNames[i] = tsgoInternalPrefix + pkg + } + + packages, err := packages.Load(&packages.Config{ + Dir: ".", + Mode: packages.LoadSyntax, + }, packagesToShimFullNames...) + if err != nil { + log.Fatalf("Error loading package: %v", err) + } + + var shimHeaderBuilder strings.Builder + var shimBuilder strings.Builder + var tempBuffer bytes.Buffer + + for _, pkg := range packages { + shimDirPath := path.Join("./shim/", strings.TrimPrefix(pkg.PkgPath, tsgoInternalPrefix)) + var extraShim ExtraShim + extraShimFilePath := path.Join(shimDirPath, "extra-shim.json") + if data, err := os.ReadFile(extraShimFilePath); err == nil { + if err := json.Unmarshal(data, &extraShim); err != nil { + fmt.Printf("error parsing %v: %v", extraShimFilePath, err) + return + } + } + if extraShim.ExtraMethods == nil { + extraShim.ExtraMethods = map[string][]string{} + } + if extraShim.ExtraFunctions == nil { + extraShim.ExtraFunctions = []string{} + } + if extraShim.ExtraFields == nil { + extraShim.ExtraFields = map[string]([]string){} + } + if extraShim.IgnoreFunctions == nil { + extraShim.IgnoreFunctions = []string{} + } + + // true if directly used, false otherwise + importedPackages := map[string]bool{} + + importPackage := func(pkg string, directly bool) { + if directly { + importedPackages[pkg] = true + } else if _, ok := importedPackages[pkg]; !ok { + importedPackages[pkg] = false + } + } + + var qualifierOnlyPackageName types.Qualifier = func(p *types.Package) string { + importPackage(p.Path(), true) + return p.Name() + } + var qualifierEmptyPackageName types.Qualifier = func(p *types.Package) string { + return "" + } + + emitGoLinknameDirective := func(localName string, fn *types.Func) { + // //go:linkname only allowed in Go files that import "unsafe" + importPackage("unsafe", false) + importPackage(pkg.Types.Path(), false) + shimBuilder.WriteString("//go:linkname ") + shimBuilder.WriteString(localName) + shimBuilder.WriteByte(' ') + shimBuilder.WriteString(fn.Pkg().Path()) + shimBuilder.WriteByte('.') + if recv := fn.Signature().Recv(); recv != nil { + shimBuilder.WriteByte('(') + shimBuilder.WriteString(types.TypeString(recv.Type(), qualifierEmptyPackageName)) + shimBuilder.WriteByte(')') + shimBuilder.WriteByte('.') + } + shimBuilder.WriteString(fn.Name()) + shimBuilder.WriteByte('\n') + } + + emitLinkedFunction := func(fn *types.Func) bool { + if fn.Signature().TypeParams() != nil { + // https://github.com/golang/go/issues/60425 + // linking to functions with generics is not supported in go:linkname + return false + } + if signatureHasUnexportedType(*fn.Signature()) { + fmt.Fprintf(os.Stderr, "Skipping %s.%s: references unexported types\n", fn.Pkg().Name(), fn.Name()) + return false + } + name := cases.Title(language.English, cases.NoLower).String(fn.Name()) + emitGoLinknameDirective(name, fn) + shimBuilder.WriteString("func ") + shimBuilder.WriteString(name) + types.WriteSignature(&tempBuffer, fn.Signature(), qualifierOnlyPackageName) + shimBuilder.Write(tempBuffer.Bytes()) + tempBuffer.Reset() + shimBuilder.WriteString("\n") + return true + } + + matchedExtraFunctions := make(map[string]bool, len(extraShim.ExtraFunctions)) + for _, name := range extraShim.ExtraFunctions { + matchedExtraFunctions[name] = false + } + matchedExtraMethods := make(map[string](map[string]bool), len(extraShim.ExtraMethods)) + for name, methods := range extraShim.ExtraMethods { + matchedExtraMethods[name] = make(map[string]bool, len(methods)) + for _, method := range methods { + matchedExtraMethods[name][method] = false + } + } + matchedExtraFields := make(map[string]bool, len(extraShim.ExtraFields)) + for name := range extraShim.ExtraFields { + matchedExtraFields[name] = false + } + + scope := pkg.Types.Scope() + for _, name := range scope.Names() { + object := scope.Lookup(name) + if !object.Exported() { + fn, isFunc := object.(*types.Func) + if _, exists := matchedExtraFunctions[name]; isFunc && exists { + if emitLinkedFunction(fn) { + matchedExtraFunctions[name] = true + } + } + continue + } + + printReexport := func(kind string) { + importPackage(pkg.Types.Path(), true) + shimBuilder.WriteString(kind) + shimBuilder.WriteString(" ") + shimBuilder.WriteString(name) + shimBuilder.WriteString(" = ") + shimBuilder.WriteString(pkg.Name) + shimBuilder.WriteString(".") + shimBuilder.WriteString(name) + shimBuilder.WriteString("\n") + } + + switch object := object.(type) { + case *types.TypeName: + t := object.Type() + named, isNamed := t.(*types.Named) + if isNamed { + _, nameWithTypeParams, _ := strings.Cut(types.TypeString(named, qualifierOnlyPackageName), ".") + importPackage(pkg.Types.Path(), true) + shimBuilder.WriteString("type ") + shimBuilder.WriteString(nameWithTypeParams) + shimBuilder.WriteString(" = ") + shimBuilder.WriteString(pkg.Name) + shimBuilder.WriteString(".") + shimBuilder.WriteString(name) + + typeParams := slices.Collect(named.TypeParams().TypeParams()) + if len(typeParams) > 0 { + // (*typeWriter)typeList + shimBuilder.WriteByte('[') + for i, ty := range typeParams { + if i > 0 { + shimBuilder.WriteByte(',') + } + shimBuilder.WriteString(ty.String()) + } + shimBuilder.WriteByte(']') + } + + shimBuilder.WriteString("\n") + } else { + printReexport("type") + } + + if extraMethods, ok := matchedExtraMethods[name]; isNamed && ok { + for method := range named.Methods() { + methodName := method.Name() + if _, exists := extraMethods[methodName]; !exists { + continue + } + extraMethods[methodName] = true + prefix := name + "_" + emitGoLinknameDirective(prefix+methodName, method) + funcDeclStr := types.ObjectString(method, qualifierOnlyPackageName) + recvStart := 0 + recvEnd := 0 + paramsStart := 0 + for i, s := range funcDeclStr { + if s == '(' { + if recvStart == 0 { + recvStart = i + 1 + } + if recvEnd != 0 { + paramsStart = i + 1 + break + } + } + if s == ')' && recvEnd == 0 { + recvEnd = i + } + } + shimBuilder.WriteString("func ") + shimBuilder.WriteString(prefix) + shimBuilder.WriteString(funcDeclStr[recvEnd+2 : paramsStart]) + shimBuilder.WriteString("recv ") + shimBuilder.WriteString(funcDeclStr[recvStart:recvEnd]) + if method.Signature().Params() != nil { + shimBuilder.WriteString(", ") + } + shimBuilder.WriteString(funcDeclStr[paramsStart:]) + shimBuilder.WriteString("\n") + } + } + + if _, ok := matchedExtraFields[name]; isNamed && ok { + importPackage("unsafe", true) + + matchedExtraFields[name] = true + mirrorStructName := "extra_" + name + + var emitExtraStruct func(name string, s *types.Struct) + emitExtraStruct = func(name string, s *types.Struct) { + shimBuilder.WriteString("type extra_") + shimBuilder.WriteString(name) + shimBuilder.WriteString(" struct {") + + dependencies := [](struct { + string + *types.Struct + }){} + for field := range s.Fields() { + shimBuilder.WriteString("\n ") + if !field.Embedded() { + shimBuilder.WriteString(field.Name()) + shimBuilder.WriteByte(' ') + } + + ptrType, ok := field.Type().(*types.Pointer) + if ok { + named, ok := ptrType.Elem().(*types.Named) + if ok && !named.Obj().Exported() { + strct, ok := named.Underlying().(*types.Struct) + if ok { + n := named.Obj().Name() + dependencies = append(dependencies, struct { + string + *types.Struct + }{n, strct}) + shimBuilder.WriteString("extra_") + shimBuilder.WriteString(n) + continue + } + } + } + + shimBuilder.WriteString( + // TODO: move to extra-shim.json + strings.ReplaceAll(types.TypeString(field.Type(), qualifierOnlyPackageName), "checker.thisAssignmentDeclarationKind", "int32"), + ) + } + shimBuilder.WriteString("\n}\n") + + for _, dep := range dependencies { + emitExtraStruct(dep.string, dep.Struct) + } + } + + strct, ok := named.Underlying().(*types.Struct) + if !ok { + log.Fatalf("expected %v to be struct", name) + } + + emitExtraStruct(name, strct) + + mappedFieldTypes := make(map[string]*types.Var, strct.NumFields()) + for field := range strct.Fields() { + mappedFieldTypes[field.Name()] = field + } + + for _, field := range extraShim.ExtraFields[name] { + shimBuilder.WriteString("func ") + shimBuilder.WriteString(name) + shimBuilder.WriteByte('_') + shimBuilder.WriteString(field) + shimBuilder.WriteString("(v *") + shimBuilder.WriteString(pkg.Name) + shimBuilder.WriteByte('.') + shimBuilder.WriteString(name) + shimBuilder.WriteString(") ") + + fieldVar, ok := mappedFieldTypes[field] + if !ok { + log.Fatalf("expected struct %q to contain field %q", name, field) + } + shimBuilder.WriteString(types.TypeString(fieldVar.Type(), qualifierOnlyPackageName)) + shimBuilder.WriteString(" {\n") + shimBuilder.WriteString(" return ((*") + shimBuilder.WriteString(mirrorStructName) + shimBuilder.WriteString(")(unsafe.Pointer(v))).") + shimBuilder.WriteString(field) + shimBuilder.WriteString("\n") + shimBuilder.WriteString("}\n") + } + } + case *types.Const: + printReexport("const") + case *types.Var: + printReexport("var") + case *types.Func: + if !slices.Contains(extraShim.IgnoreFunctions, name) { + emitLinkedFunction(object) + } + } + } + + exit := false + for fnName, found := range matchedExtraFunctions { + if found { + continue + } + fmt.Printf("ERROR: couldn't find %v function\n", fnName) + exit = true + } + for name, methods := range matchedExtraMethods { + for methodName, found := range methods { + if found { + continue + } + fmt.Printf("ERROR: couldn't find %v.%v method\n", name, methodName) + exit = true + } + } + if exit { + os.Exit(1) + } + + // https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source + shimHeaderBuilder.WriteString("\n// Code generated by tools/gen_shims. DO NOT EDIT.\n\n") + shimHeaderBuilder.WriteString("package ") + shimHeaderBuilder.WriteString(pkg.Name) + shimHeaderBuilder.WriteString("\n\n") + importsList := slices.Collect(maps.Keys(importedPackages)) + slices.Sort(importsList) + for _, imported := range importsList { + shimHeaderBuilder.WriteString("import ") + if !importedPackages[imported] { + shimHeaderBuilder.WriteString("_ ") + } + shimHeaderBuilder.WriteString("\"") + shimHeaderBuilder.WriteString(imported) + shimHeaderBuilder.WriteString("\"\n") + } + shimHeaderBuilder.WriteString("\n") + + shimGoPath := path.Join(shimDirPath, "shim.go") + if err := os.WriteFile(shimGoPath, []byte(shimHeaderBuilder.String()+shimBuilder.String()), 0644); err != nil { + log.Fatalf("error writing shim file %s: %v", shimGoPath, err) + } + + shimHeaderBuilder.Reset() + shimBuilder.Reset() + } +} diff --git a/tools/update-shims.sh b/tools/update-shims.sh new file mode 100755 index 0000000..17fa2c9 --- /dev/null +++ b/tools/update-shims.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env -S bash -euxo pipefail + +# Regenerate all shim packages from the local typescript-go source. +# Usage: ./tools/update-shims.sh +# +# This script: +# 1. Resets extern/typescript-go to the committed submodule pointer +# 2. Applies patches on top +# 3. Updates shim go.mod files to point at the (unpatched) tsgo commit +# 4. Regenerates shim.go files via gen_shims +# 5. Verifies the build + +cd "$(git rev-parse --show-toplevel)" + +# Reset tsgo to the clean submodule pointer, then apply patches +pushd extern/typescript-go +git checkout "$(git -C ../.. rev-parse HEAD:extern/typescript-go)" +TSGO_COMMIT="$(git rev-parse HEAD)" +if ls ../../patches/tsgo/*.patch &>/dev/null; then + git am --3way --no-gpg-sign ../../patches/tsgo/*.patch +fi +popd + +find ./shim -type f -name 'go.mod' -execdir go get -x "github.com/microsoft/typescript-go@$TSGO_COMMIT" \; -execdir go mod tidy -v \; +go mod tidy + +go run ./tools/gen_shims + +go build ./...