typenative 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +29 -0
- package/.github/workflows/npm-publish-github-packages.yml +2 -2
- package/CHANGELOG.md +43 -0
- package/CONTRIBUTION.md +130 -0
- package/README.md +251 -213
- package/bin/index.js +1 -1
- package/bin/transpiler.js +3721 -164
- package/conformance.md +660 -0
- package/package.json +9 -61
- package/tsparser/main.go +17 -1
- package/tsparser/tsparser.exe +2 -2
- package/TODO.md +0 -38
package/conformance.md
ADDED
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
# Conformance
|
|
2
|
+
|
|
3
|
+
Every TypeScript language feature and standard-library API TypeNative aims to
|
|
4
|
+
support, split by area. Each ✅ row links to the [conformance/](conformance/)
|
|
5
|
+
probe that proves it transpiles correctly (`npm run conformance`, filter with an
|
|
6
|
+
optional substring: `node scripts/conformance.mjs <filter>`; `--native` runs the
|
|
7
|
+
self-hosted binary). Each ❌ row is a known gap with no passing probe yet.
|
|
8
|
+
|
|
9
|
+
## Basic types
|
|
10
|
+
|
|
11
|
+
| Feature | Status | Probe | Notes |
|
|
12
|
+
| ---------------------------------------------- | :----: | -------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
13
|
+
| `number` | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | Transpiled to `float64` |
|
|
14
|
+
| `boolean` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | Transpiled to `bool` |
|
|
15
|
+
| `string` | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
|
|
16
|
+
| `null` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
|
|
17
|
+
| `undefined` | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | |
|
|
18
|
+
| `any` / `unknown` | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Dynamic values handled at runtime (JSON-like objects, arrays, primitives) |
|
|
19
|
+
| Nullable types (`T \| null`, `T \| undefined`) | ✅ | [syntax-null-undefined.ts](conformance/syntax-null-undefined.ts) | Transpiled to Go pointer types |
|
|
20
|
+
| `bigint` | ✅ | [syntax-bigint.ts](conformance/syntax-bigint.ts) | `2n` literals → `*big.Int`; `**` → `.Exp`, comparisons via `.Cmp` |
|
|
21
|
+
| `symbol` | ✅ | [syntax-symbols.ts](conformance/syntax-symbols.ts) | `Symbol()` → unique `*TnSymbol` pointers, usable as record keys |
|
|
22
|
+
| `object` type | ✅ | [syntax-object-type.ts](conformance/syntax-object-type.ts) | `object` → `interface{}` |
|
|
23
|
+
| `void` / `never` | ✅ | [syntax-void-never.ts](conformance/syntax-void-never.ts) | No return value in Go |
|
|
24
|
+
|
|
25
|
+
## Variables & destructuring
|
|
26
|
+
|
|
27
|
+
| Feature | Status | Probe | Notes |
|
|
28
|
+
| --------------------------------------- | :----: | -------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
29
|
+
| Variable declarations (`let` / `const`) | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | |
|
|
30
|
+
| Array destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
|
|
31
|
+
| Object destructuring | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
|
|
32
|
+
| Destructuring with defaults | ✅ | [syntax-destructuring-defaults.ts](conformance/syntax-destructuring-defaults.ts) | Missing elements/properties take defaults (nil- and bounds-checked) |
|
|
33
|
+
| Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
|
|
34
|
+
| Object shorthand | ✅ | [syntax-destructuring.ts](conformance/syntax-destructuring.ts) | Parenthesized initializers; elision and element/property reads |
|
|
35
|
+
| Object spread | ✅ | [syntax-object-spread.ts](conformance/syntax-object-spread.ts) | Spread sources copied field-by-field into the new struct |
|
|
36
|
+
| Array spread | ✅ | [syntax-array-spread.ts](conformance/syntax-array-spread.ts) | `[...arr]`, `fn(...args)` |
|
|
37
|
+
| `delete` operator | ✅ | [syntax-delete.ts](conformance/syntax-delete.ts) | `delete o.key` on records |
|
|
38
|
+
| Computed keys | ✅ | [syntax-computed-keys.ts](conformance/syntax-computed-keys.ts) | Computed keys become map entries; `o.name` reads lower to `.Get("name")` |
|
|
39
|
+
| Records / dictionaries | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `Record<K, V>` and objects indexed by key → Go maps |
|
|
40
|
+
| Tuples | ✅ | [syntax-tuples.ts](conformance/syntax-tuples.ts) | `[string, number]` fixed-length arrays |
|
|
41
|
+
| Top-level / module-scope variables | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Functions see main-file top-level variables |
|
|
42
|
+
| Numeric separators | ✅ | [syntax-numeric-separators.ts](conformance/syntax-numeric-separators.ts) | `1_000_000` |
|
|
43
|
+
| Hex / octal / binary literals | ✅ | [syntax-numeric-literals.ts](conformance/syntax-numeric-literals.ts) | `0xFF`, `0o17`, `0b1010`, `1e3` |
|
|
44
|
+
| `var` declarations (hoisting) | ✅ | [syntax-var.ts](conformance/syntax-var.ts) | Function- and module-level `var` |
|
|
45
|
+
| `using` / `await using` declarations | ❌ | — | Explicit resource management; no probe yet |
|
|
46
|
+
|
|
47
|
+
## Operators
|
|
48
|
+
|
|
49
|
+
| Feature | Status | Probe | Notes |
|
|
50
|
+
| ---------------------------- | :----: | ---------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
51
|
+
| Arithmetic operators | ✅ | [syntax-arithmetic.ts](conformance/syntax-arithmetic.ts) | `+`, `-`, etc.; `%`/`%=` via `math.Mod` |
|
|
52
|
+
| Exponent operator | ✅ | [syntax-exponent.ts](conformance/syntax-exponent.ts) | `2 ** 10` |
|
|
53
|
+
| Bitwise operators | ✅ | [syntax-bitwise.ts](conformance/syntax-bitwise.ts) | `&`, `\|`, `^`, `<<`, `>>` |
|
|
54
|
+
| Unsigned shift | ✅ | [syntax-unsigned-shift.ts](conformance/syntax-unsigned-shift.ts) | `>>>` |
|
|
55
|
+
| Comparison operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `==`, `!=`, `===`, `!==`, etc. |
|
|
56
|
+
| Logical operators | ✅ | [syntax-variables.ts](conformance/syntax-variables.ts) | `&&`, `\|\|` |
|
|
57
|
+
| Increment / decrement | ✅ | [syntax-increment-expression.ts](conformance/syntax-increment-expression.ts) | `++`, `--`, incl. as expressions |
|
|
58
|
+
| Non-null assertion (`!`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Stripped during transpilation |
|
|
59
|
+
| Ternary expressions | ✅ | [syntax-ternary.ts](conformance/syntax-ternary.ts) | `condition ? a : b` |
|
|
60
|
+
| Nullish coalescing | ✅ | [syntax-nullish.ts](conformance/syntax-nullish.ts) | `??` operator, incl. chains |
|
|
61
|
+
| Optional chaining | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `obj?.prop`, `arr?.[i]`, chains across calls |
|
|
62
|
+
| Nullish / logical assignment | ✅ | [syntax-logical-assignment.ts](conformance/syntax-logical-assignment.ts) | `??=`, `\|\|=`, `&&=` |
|
|
63
|
+
| `in` operator | ✅ | [syntax-in-operator.ts](conformance/syntax-in-operator.ts) | `"key" in obj` on records |
|
|
64
|
+
| `typeof` | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `"key" in obj`, `typeof x === "string"` |
|
|
65
|
+
| `instanceof` | ✅ | [syntax-instanceof.ts](conformance/syntax-instanceof.ts) | Class instance checks |
|
|
66
|
+
| JS truthiness | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `if (str)`, `!count`, `a \|\| fallback` on any type |
|
|
67
|
+
| Loose equality (`==`) | ✅ | [semantics-loose-equality.ts](conformance/semantics-loose-equality.ts) | `bool`/`number`/`string` mixtures coerce like JS (`TnNumber`/`TnParseFloat`) |
|
|
68
|
+
| Optional call (`fn?.()`) | ✅ | [syntax-optional-call.ts](conformance/syntax-optional-call.ts) | Nil check on the function value; result is nullable |
|
|
69
|
+
| Comma operator | ✅ | [syntax-comma-operator.ts](conformance/syntax-comma-operator.ts) | In `for` headers (`i = 0, j = 10` / `i++, j--`) |
|
|
70
|
+
| `void` operator | ✅ | [syntax-void-operator.ts](conformance/syntax-void-operator.ts) | Evaluates, then `nil` |
|
|
71
|
+
| `new.target` | ❌ | — | No probe yet |
|
|
72
|
+
|
|
73
|
+
## Control flow
|
|
74
|
+
|
|
75
|
+
| Feature | Status | Probe | Notes |
|
|
76
|
+
| ----------------------------------- | :----: | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
77
|
+
| If / else statements | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts) | Incl. unbraced bodies and else-if chains |
|
|
78
|
+
| Switch statements | ✅ | [syntax-switch.ts](conformance/syntax-switch.ts) | Case and default statements |
|
|
79
|
+
| Switch fallthrough | ✅ | [syntax-switch-fallthrough.ts](conformance/syntax-switch-fallthrough.ts) | Explicit fallthrough between cases |
|
|
80
|
+
| `for` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Standard `for` loops, incl. unbraced bodies |
|
|
81
|
+
| `continue` | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | `continue` in all loop kinds |
|
|
82
|
+
| `break` | ✅ | [syntax-if-switch.ts](conformance/syntax-if-switch.ts), [syntax-do-while.ts](conformance/syntax-do-while.ts) | In switch cases and loops |
|
|
83
|
+
| `for...of` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts), [syntax-for-of-string.ts](conformance/syntax-for-of-string.ts) | Arrays, Maps, Sets, strings, tuples; `Object.entries()` unwrapping |
|
|
84
|
+
| `for...in` loops | ✅ | [syntax-for-in.ts](conformance/syntax-for-in.ts) | Key range over records/maps |
|
|
85
|
+
| `for await...of` | ❌ | — | Requires async iteration (see [Async & timing](#async--timing)) |
|
|
86
|
+
| `while` loops | ✅ | [syntax-loops.ts](conformance/syntax-loops.ts) | Transpiled to Go's `for` loops; assignment in condition |
|
|
87
|
+
| `do...while` loops | ✅ | [syntax-do-while.ts](conformance/syntax-do-while.ts) | Implemented with conditional break |
|
|
88
|
+
| Labeled loops | ✅ | [syntax-labeled-loops.ts](conformance/syntax-labeled-loops.ts) | `LabeledStatement` → Go labels; labeled `continue`/`break` |
|
|
89
|
+
| `try` / `catch` / `finally` | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | `throw` → `panic`; catch/finally via `defer`/`recover` |
|
|
90
|
+
| Optional catch binding (`catch {}`) | ✅ | [syntax-try-catch-finally.ts](conformance/syntax-try-catch-finally.ts) | |
|
|
91
|
+
| Custom error classes | ✅ | [syntax-custom-errors.ts](conformance/syntax-custom-errors.ts) | `extends Error` → embedded `TnError`; constructors take the message |
|
|
92
|
+
| `Error.message` | ✅ | [syntax-error-message.ts](conformance/syntax-error-message.ts) | `throw new Error` panics with a `*TnError`; `.message` on caught values |
|
|
93
|
+
| Narrowing | ✅ | [syntax-typeof.ts](conformance/syntax-typeof.ts) | `T \| undefined` narrowed after `if (x)`, `x !== undefined`, early returns |
|
|
94
|
+
|
|
95
|
+
## Functions
|
|
96
|
+
|
|
97
|
+
| Feature | Status | Probe | Notes |
|
|
98
|
+
| --------------------------------------------- | :----: | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |
|
|
99
|
+
| Function declarations | ✅ | [syntax-functions.ts](conformance/syntax-functions.ts) | Transpiled to Go functions |
|
|
100
|
+
| Arrow functions | ✅ | [syntax-arrow-functions.ts](conformance/syntax-arrow-functions.ts) | Transpiled to anonymous functions |
|
|
101
|
+
| IIFEs | ✅ | [syntax-iife.ts](conformance/syntax-iife.ts) | `(() => { ... })()` and `(function name() { ... })()` |
|
|
102
|
+
| Closures over mutable state | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | Functions capturing and mutating outer variables; per-iteration `let` |
|
|
103
|
+
| Function types | ✅ | [syntax-closures.ts](conformance/syntax-closures.ts) | `() => number`, `(x: number) => string` as type annotations |
|
|
104
|
+
| Default parameter values | ✅ | [syntax-default-params.ts](conformance/syntax-default-params.ts) | `function(x = defaultValue)`, incl. constructors, methods, arrows |
|
|
105
|
+
| Rest parameters | ✅ | [syntax-rest-params.ts](conformance/syntax-rest-params.ts) | `function(...args: T[])` → Go variadic |
|
|
106
|
+
| Spread in calls | ✅ | [syntax-spread-call.ts](conformance/syntax-spread-call.ts) | `f(...args)` incl. tuples |
|
|
107
|
+
| Optional parameters | ✅ | [syntax-optional-params.ts](conformance/syntax-optional-params.ts) | `function f(x?: string)` |
|
|
108
|
+
| Destructured parameters | ✅ | [syntax-destructuring-params.ts](conformance/syntax-destructuring-params.ts) | `function f({ a, b }: T)`, `([x, y]: number[])` |
|
|
109
|
+
| Contextual object-literal arguments | ✅ | [syntax-contextual-arguments.ts](conformance/syntax-contextual-arguments.ts) | Struct type inferred from parameter / return type |
|
|
110
|
+
| Recursion | ✅ | [syntax-recursion.ts](conformance/syntax-recursion.ts) | Direct self-recursion |
|
|
111
|
+
| Recursive arrow functions | ✅ | [syntax-recursive-arrow.ts](conformance/syntax-recursive-arrow.ts) | `const f = () => … f() …` → declared, then assigned |
|
|
112
|
+
| Generators (`function*` / `yield` / `yield*`) | ✅ | [syntax-generators.ts](conformance/syntax-generators.ts) | `function*` runs in a goroutine sending yields over a channel; `for...of` ranges it |
|
|
113
|
+
| Async generators (`async function*`) | ✅ | [syntax-async-generators.ts](conformance/syntax-async-generators.ts) | Goroutine + channel, consumed with `for await` |
|
|
114
|
+
| Custom iterators (`Symbol.iterator`) | ✅ | [syntax-custom-iterators.ts](conformance/syntax-custom-iterators.ts) | `*[Symbol.iterator]()` → a `Symbol_iterator()` channel method |
|
|
115
|
+
| `as const` assertions | ✅ | [syntax-as-const.ts](conformance/syntax-as-const.ts) | Erased during transpilation |
|
|
116
|
+
| Function overloads | ✅ | [syntax-function-overloads.ts](conformance/syntax-function-overloads.ts) | Signatures are erased; the implementation is emitted |
|
|
117
|
+
| `this` parameter (`function f(this: T)`) | ✅ | [syntax-this-parameter.ts](conformance/syntax-this-parameter.ts) | Erased |
|
|
118
|
+
| `arguments` object | ❌ | — | No probe yet |
|
|
119
|
+
|
|
120
|
+
## Classes & interfaces
|
|
121
|
+
|
|
122
|
+
| Feature | Status | Probe | Notes |
|
|
123
|
+
| ---------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
124
|
+
| Classes | ✅ | [syntax-class.ts](conformance/syntax-class.ts) | Transpiled to Go structs with constructor and receiver methods |
|
|
125
|
+
| Constructor parameter properties | ✅ | [syntax-class-parameter-properties.ts](conformance/syntax-class-parameter-properties.ts) | `constructor(private x: number)` |
|
|
126
|
+
| Class inheritance | ✅ | [syntax-class-inheritance.ts](conformance/syntax-class-inheritance.ts) | `super.method()` → `self.Parent.method()`; inherited methods copied for `this` dispatch |
|
|
127
|
+
| `implements` clauses | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | `class C implements I` |
|
|
128
|
+
| Interface `extends` | ✅ | [syntax-interface-extends.ts](conformance/syntax-interface-extends.ts) | Inherited properties flattened into the derived struct |
|
|
129
|
+
| Static members | ✅ | [syntax-class-static.ts](conformance/syntax-class-static.ts) | Static members → package-level `Class_member` vars/functions |
|
|
130
|
+
| Getters / setters (classes) | ✅ | [syntax-class-getters.ts](conformance/syntax-class-getters.ts) | `c.v` reads/writes rewrite to `Get_v()`/`Set_v()` accessor calls |
|
|
131
|
+
| Getters (object literals) | ✅ | [syntax-object-getters.ts](conformance/syntax-object-getters.ts) | Getter closures stored as function fields; reads invoke them |
|
|
132
|
+
| Object-literal methods | ✅ | [syntax-object-methods.ts](conformance/syntax-object-methods.ts) | Method closures stored as function fields capturing the instance (`this` → the object) |
|
|
133
|
+
| Private `#` fields | ✅ | [syntax-class-private-fields.ts](conformance/syntax-class-private-fields.ts) | `#secret` → a plain (name-mangled) struct field |
|
|
134
|
+
| Access modifiers (`private` / `protected` / `public` on members) | ✅ | [syntax-access-modifiers.ts](conformance/syntax-access-modifiers.ts) | `private` / `protected` / `public` are erased |
|
|
135
|
+
| Abstract classes | ✅ | [syntax-class-abstract.ts](conformance/syntax-class-abstract.ts) | Abstract members skipped; concrete methods copied onto subclasses |
|
|
136
|
+
| Static initialization blocks (`static {}`) | ✅ | [syntax-static-blocks.ts](conformance/syntax-static-blocks.ts) | Go `func init()` |
|
|
137
|
+
| Class expressions (`const C = class {}`) | ✅ | [syntax-class-expressions.ts](conformance/syntax-class-expressions.ts) | `const C = class {…}` becomes a class named after the variable |
|
|
138
|
+
| Interfaces | ✅ | [syntax-class-implements.ts](conformance/syntax-class-implements.ts) | Transpiled to Go interfaces |
|
|
139
|
+
| Optional properties | ✅ | [syntax-optional-chaining.ts](conformance/syntax-optional-chaining.ts) | `prop?: Type` in interfaces/types |
|
|
140
|
+
| Type-aware method dispatch | ✅ | [semantics-method-dispatch.ts](conformance/semantics-method-dispatch.ts) | Class `.push()` / `.length` not confused with array builtins |
|
|
141
|
+
| Index signatures (`[key: string]: T`) | ✅ | [syntax-index-signatures.ts](conformance/syntax-index-signatures.ts) | `{ [k: K]: V }` is `Record<K, V>` (an ordered Go map) |
|
|
142
|
+
|
|
143
|
+
## Generics
|
|
144
|
+
|
|
145
|
+
| Feature | Status | Probe | Notes |
|
|
146
|
+
| ------------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ---------------------------------- |
|
|
147
|
+
| Generic functions | ✅ | [syntax-generic-functions.ts](conformance/syntax-generic-functions.ts) | Type parameters → Go generics; call sites infer from arguments |
|
|
148
|
+
| Generic classes | ✅ | [syntax-generic-classes.ts](conformance/syntax-generic-classes.ts) | Type parameters via Go generics |
|
|
149
|
+
| Generic constraints (`<T extends U>`) | ✅ | [syntax-generic-constraints.ts](conformance/syntax-generic-constraints.ts) | Object-type bounds become `any`; properties of `T` values read dynamically |
|
|
150
|
+
| Default type parameters (`<T = D>`) | ✅ | [syntax-generic-defaults.ts](conformance/syntax-generic-defaults.ts) | Defaults are erased; Go infers from arguments |
|
|
151
|
+
| Generic interfaces / type aliases | ✅ | [syntax-generic-interfaces.ts](conformance/syntax-generic-interfaces.ts) | Go generic structs; literals instantiate them (`Box[float64]{…}`) |
|
|
152
|
+
| `const` type parameters / variance annotations (`in` / `out`) | ❌ | — | No probe yet |
|
|
153
|
+
|
|
154
|
+
## Enums
|
|
155
|
+
|
|
156
|
+
| Feature | Status | Probe | Notes |
|
|
157
|
+
| ------------------------------------- | :----: | ------------------------------------------------------------ | -------------------------------------------- |
|
|
158
|
+
| Numeric enums | ✅ | [syntax-enum-numeric.ts](conformance/syntax-enum-numeric.ts) | Numeric members are `float64` constants; string enums keep a named type |
|
|
159
|
+
| String enums | ✅ | [syntax-enum-string.ts](conformance/syntax-enum-string.ts) | `enum` declarations and member access |
|
|
160
|
+
| `const enum` | ✅ | [syntax-const-enum.ts](conformance/syntax-const-enum.ts) | Compiled like a regular enum |
|
|
161
|
+
| Computed / heterogeneous enum members | ❌ | — | `enum E { A = f(), B = 's' }`; no probe yet |
|
|
162
|
+
|
|
163
|
+
## Type-system features
|
|
164
|
+
|
|
165
|
+
| Feature | Status | Probe | Notes |
|
|
166
|
+
| --------------------------------------------------------- | :----: | -------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
167
|
+
| Type aliases | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `type P = { x: number }` → Go struct; alias-of-alias |
|
|
168
|
+
| Union types | ✅ | [syntax-union-types.ts](conformance/syntax-union-types.ts) | Narrowed via `typeof` checks |
|
|
169
|
+
| Type guards (`is`) | ✅ | [syntax-type-guards.ts](conformance/syntax-type-guards.ts) | `p is T` → Go `bool`; `in` checks struct fields at runtime |
|
|
170
|
+
| `as` assertions | ✅ | [syntax-type-aliases.ts](conformance/syntax-type-aliases.ts) | `x as T`, incl. angle-bracket syntax |
|
|
171
|
+
| Self-host contextual typing | ✅ | [syntax-selfhost-context.ts](conformance/syntax-selfhost-context.ts) | Object/array literals typed from context, `Record` literals, `in`, `any` params |
|
|
172
|
+
| Decorators (`@`) | ❌ | — | No probe yet |
|
|
173
|
+
| Namespaces / `module` blocks | ❌ | — | No probe yet |
|
|
174
|
+
| `override` modifier | ✅ | [syntax-override.ts](conformance/syntax-override.ts) | Erased |
|
|
175
|
+
| `readonly` modifier (properties, `readonly T[]`) | ✅ | [syntax-readonly.ts](conformance/syntax-readonly.ts) | Erased (`readonly T[]` → `[]T`) |
|
|
176
|
+
| `satisfies` operator | ✅ | [syntax-satisfies.ts](conformance/syntax-satisfies.ts) | Checked by tsc, erased; the type guides literals |
|
|
177
|
+
| `keyof` / mapped types | ✅ | [syntax-keyof-mapped-types.ts](conformance/syntax-keyof-mapped-types.ts) | `keyof` → `string`; mapped types → structs (literal keys) or maps |
|
|
178
|
+
| Conditional types | ✅ | [syntax-conditional-types.ts](conformance/syntax-conditional-types.ts) | Resolved to their branch's Go type |
|
|
179
|
+
| `infer` types | ✅ | [syntax-infer-types.ts](conformance/syntax-infer-types.ts) | Resolved to their branch's Go type |
|
|
180
|
+
| `import type` / `export type` | ✅ | [syntax-import-type.ts](conformance/syntax-import-type.ts) | Type-only imports are erased |
|
|
181
|
+
| Intersection types (`A & B`) | ✅ | [syntax-intersection-types.ts](conformance/syntax-intersection-types.ts) | Object types merge into one struct |
|
|
182
|
+
| Literal types (`'a' \| 'b'`) | [syntax-literal-types.ts](conformance/syntax-literal-types.ts) | String literal unions → `string` | No probe yet |
|
|
183
|
+
| Tuple optional / rest / labeled elements | ✅ | [syntax-tuple-elements.ts](conformance/syntax-tuple-elements.ts) | Tuples are slices |
|
|
184
|
+
| Indexed access types (`T['k']`) | ✅ | [syntax-indexed-access-types.ts](conformance/syntax-indexed-access-types.ts) | `T['k']` resolves to the member type |
|
|
185
|
+
| Type-level `typeof` (`typeof obj`) | ✅ | [syntax-type-typeof.ts](conformance/syntax-type-typeof.ts) | The variable's Go type |
|
|
186
|
+
| Template literal types | ✅ | [syntax-template-literal-types.ts](conformance/syntax-template-literal-types.ts) | Template literal types → `string` |
|
|
187
|
+
| Utility types (`Partial`, `Pick`, `Omit`, …) | ✅ | [syntax-utility-types.ts](conformance/syntax-utility-types.ts) | `Partial` / `Required` / `Readonly` / `Pick` / `Omit` / `NonNullable` → the base type |
|
|
188
|
+
| Assertion functions (`asserts x is T`) | ✅ | [syntax-assertion-functions.ts](conformance/syntax-assertion-functions.ts) | No return value |
|
|
189
|
+
| Callable / construct signatures (`type F = { (): void }`) | ❌ | — | No probe yet |
|
|
190
|
+
| JSX / `.tsx` syntax | ❌ | — | No probe yet |
|
|
191
|
+
| Ambient declarations (`declare`, `.d.ts`, `x!: T`) | ❌ | — | No probe yet |
|
|
192
|
+
| `export =` / `import x = require()` | ❌ | — | No probe yet |
|
|
193
|
+
|
|
194
|
+
## Modules & imports
|
|
195
|
+
|
|
196
|
+
| Feature | Status | Probe | Notes |
|
|
197
|
+
| -------------------------------------------------- | :----: | ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
198
|
+
| Named imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from './file'` |
|
|
199
|
+
| Import renaming (`import { x as y }`) | ✅ | [syntax-import-renaming.ts](conformance/syntax-import-renaming.ts) | Local file imports |
|
|
200
|
+
| Named exports (`export const` / `export function`) | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Helper [import-local-helper.ts](conformance/import-local-helper.ts) exports `multiply` |
|
|
201
|
+
| Default imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import x from 'pkg'` — namespace stripped in output |
|
|
202
|
+
| Namespace imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import * as x from 'pkg'` |
|
|
203
|
+
| Local file imports | ✅ | [syntax-import-local.ts](conformance/syntax-import-local.ts) | Relative paths transpiled to a separate Go file (helper: [import-local-helper.ts](conformance/import-local-helper.ts)) |
|
|
204
|
+
| Default export | ✅ | [syntax-default-export.ts](conformance/syntax-default-export.ts) | `export default function` |
|
|
205
|
+
| Node.js built-in imports | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | `import { join } from 'node:path'` mapped to Go stdlib (see [Standard library](#standard-library)) |
|
|
206
|
+
| Go package imports | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | `import { x } from 'go:pkg'` |
|
|
207
|
+
| npm package imports | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | `import { x } from 'pkg'` mapped to Go module imports |
|
|
208
|
+
| Re-exports (`export { x } from`, `export *`) | ❌ | — | No probe yet |
|
|
209
|
+
| Dynamic `import()` | ❌ | — | No probe yet |
|
|
210
|
+
| Side-effect imports (`import './mod'`) | ❌ | — | No probe yet |
|
|
211
|
+
| `import.meta.url` | ✅ | [syntax-import-meta.ts](conformance/syntax-import-meta.ts) | The `file://` URL of the running program (`os.Executable` → `pathToFileURL`) |
|
|
212
|
+
|
|
213
|
+
## Async & timing
|
|
214
|
+
|
|
215
|
+
| Feature | Status | Probe | Notes |
|
|
216
|
+
| ---------------------------------------------------- | :----: | ------------------------------------------------------------ | -------------------------------------- |
|
|
217
|
+
| `async` / `await` | ✅ | [syntax-async-await.ts](conformance/syntax-async-await.ts) | Async functions send returns over a channel; `await` receives; pending work drains before exit |
|
|
218
|
+
| `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | `new Promise` executor runs in a goroutine; `.then` consumes the channel on a wait group |
|
|
219
|
+
| `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | `TnPromiseAll` drains every promise channel into a slice |
|
|
220
|
+
| `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
|
|
221
|
+
| `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
|
|
222
|
+
| `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
|
|
223
|
+
| `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
|
|
224
|
+
| `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker`; the process lives until cleared |
|
|
225
|
+
| `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or a timer callback) |
|
|
226
|
+
| `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | `time.AfterFunc` registered on a wait group the process waits on |
|
|
227
|
+
|
|
228
|
+
## Semantics (JS behaviour preserved)
|
|
229
|
+
|
|
230
|
+
| Feature | Status | Probe | Notes |
|
|
231
|
+
| ----------------------------------------- | :----: | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
232
|
+
| Array reference semantics | ✅ | [semantics-array-reference.ts](conformance/semantics-array-reference.ts) | Array variables hold `*[]T` so aliases share the slice header |
|
|
233
|
+
| Object reference semantics | ✅ | [semantics-object-reference.ts](conformance/semantics-object-reference.ts) | Aliased objects share state; [semantics-parameter-mutation.ts](conformance/semantics-parameter-mutation.ts) |
|
|
234
|
+
| Object identity | ✅ | [semantics-object-identity.ts](conformance/semantics-object-identity.ts) | Equal literals are different references |
|
|
235
|
+
| Object key order | ✅ | [semantics-object-key-order.ts](conformance/semantics-object-key-order.ts) | Insertion order preserved |
|
|
236
|
+
| Map insertion order | ✅ | [semantics-map-order.ts](conformance/semantics-map-order.ts) | Iteration follows insertion order |
|
|
237
|
+
| Set insertion order | ✅ | [semantics-set-order.ts](conformance/semantics-set-order.ts) | Spread follows insertion order |
|
|
238
|
+
| Default sort is lexicographic | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | `[10, 9, 1].sort()` → `1,10,9` |
|
|
239
|
+
| Float math | ✅ | [semantics-float-math.ts](conformance/semantics-float-math.ts) | `7 / 2 === 3.5`, `0.1 + 0.2 !== 0.3` |
|
|
240
|
+
| Integer precision | ✅ | [semantics-integer-precision.ts](conformance/semantics-integer-precision.ts) | `2 ** 53 + 1 === 2 ** 53` |
|
|
241
|
+
| `NaN` semantics | ✅ | [semantics-nan.ts](conformance/semantics-nan.ts) | `NaN !== NaN`, `Number.isNaN(0 / 0)` |
|
|
242
|
+
| String-number concatenation order | ✅ | [semantics-string-number-concat.ts](conformance/semantics-string-number-concat.ts) | `'a' + 1 + 2` vs `1 + 2 + 'a'` |
|
|
243
|
+
| Array truthiness | ✅ | [semantics-array-truthy.ts](conformance/semantics-array-truthy.ts) | Empty array is truthy |
|
|
244
|
+
| Loop closures capture per-iteration `let` | ✅ | [semantics-loop-closures.ts](conformance/semantics-loop-closures.ts) | |
|
|
245
|
+
| Functions stored in Records | ✅ | [semantics-record-functions.ts](conformance/semantics-record-functions.ts) | `rec.fn()` → `rec.Get("fn")()`, also for names like `get` / `sort` |
|
|
246
|
+
|
|
247
|
+
## Standard library
|
|
248
|
+
|
|
249
|
+
Every standard-library API TypeNative ports, split by module. Per
|
|
250
|
+
[types/typenative-npm.d.ts](types/typenative-npm.d.ts) (`node:*`) and
|
|
251
|
+
[types/typenative-go.d.ts](types/typenative-go.d.ts) (`go:*`).
|
|
252
|
+
|
|
253
|
+
### `console`
|
|
254
|
+
|
|
255
|
+
| API | Status | Probe | Notes |
|
|
256
|
+
| ---------------------------------- | :----: | ------------------------------------------------------ | ------------------------------------------------------ |
|
|
257
|
+
| `console.log` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | Mapped to `fmt.Println` |
|
|
258
|
+
| `console.error` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | `fmt.Fprintln(os.Stderr, ...)` |
|
|
259
|
+
| `console.warn` | ✅ | [lib-console-error.ts](conformance/lib-console-error.ts) | Mapped to stderr like `console.error` |
|
|
260
|
+
| `console.time` / `console.timeEnd` | ✅ | [lib-console-time.ts](conformance/lib-console-time.ts) | Via `time.Now` / `time.Since` |
|
|
261
|
+
|
|
262
|
+
### `Math`
|
|
263
|
+
|
|
264
|
+
| API | Status | Probe | Notes |
|
|
265
|
+
| ------------------------------------------------------------------ | :----: | ------------------------------------------------------ | --------------------------------------------------------------- |
|
|
266
|
+
| `Math.floor` / `ceil` / `round` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to `math.Floor`, `math.Ceil`, `math.Round` |
|
|
267
|
+
| `Math.abs` / `sqrt` / `pow` | ✅ | [lib-math.ts](conformance/lib-math.ts) | Mapped to corresponding `math` functions |
|
|
268
|
+
| `Math.min` / `Math.max` | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Go builtins `min` / `max` |
|
|
269
|
+
| `Math.max(...arr)` / spread & variadic | ✅ | [lib-math-min-max.ts](conformance/lib-math-min-max.ts) | Spread and any number of arguments via `slices.Max` / `max` |
|
|
270
|
+
| `Math.random` | ✅ | [lib-math-random.ts](conformance/lib-math-random.ts) | Mapped to `rand.Float64()` |
|
|
271
|
+
| `Math.log` / `log2` / `log10` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Log` / `math.Log2` / `math.Log10` |
|
|
272
|
+
| `Math.sin` / `cos` / `tan` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Sin` / `math.Cos` / `math.Tan` |
|
|
273
|
+
| `Math.trunc` / `sign` | ✅ | [lib-math-functions.ts](conformance/lib-math-functions.ts) | `math.Trunc` / inline sign check |
|
|
274
|
+
| Constants (`Math.PI`, `Math.E`, …) | ✅ | [lib-math-constants.ts](conformance/lib-math-constants.ts) | `math.Pi`, `math.E`, `math.Sqrt2`, … |
|
|
275
|
+
| `Math.asin` / `acos` / `atan` / `atan2` / `hypot` / `cbrt` / `exp` | ✅ | [lib-math-more.ts](conformance/lib-math-more.ts) | Corresponding `math` functions |
|
|
276
|
+
|
|
277
|
+
### `JSON`
|
|
278
|
+
|
|
279
|
+
| API | Status | Probe | Notes |
|
|
280
|
+
| ---------------- | :----: | ---------------------------------------------------------- | ------------------------------------- |
|
|
281
|
+
| `JSON.parse` | ✅ | [lib-json-parse.ts](conformance/lib-json-parse.ts) | Mapped to `encoding/json` `Unmarshal` |
|
|
282
|
+
| `JSON.stringify` | ✅ | [lib-json-stringify.ts](conformance/lib-json-stringify.ts) | Reflection serializer includes unexported struct fields |
|
|
283
|
+
|
|
284
|
+
### `Object`
|
|
285
|
+
|
|
286
|
+
| API | Status | Probe | Notes |
|
|
287
|
+
| ---------------------------------------------------------- | :----: | ---------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
288
|
+
| `Object.keys` / `values` / `entries` | ✅ | [lib-object-helpers.ts](conformance/lib-object-helpers.ts) | Map key/value iteration helpers; typed results for maps and records |
|
|
289
|
+
| `Object.assign` | ✅ | [lib-object-assign.ts](conformance/lib-object-assign.ts) | Sources (structs, maps, dynamic objects) copied into an ordered map |
|
|
290
|
+
| `Object.freeze` / `seal` / `isFrozen` | ✅ | [lib-object-freeze.ts](conformance/lib-object-freeze.ts) | Integrity level tracked by identity; writes rejected by `Readonly<T>` types |
|
|
291
|
+
| `Object.fromEntries` | ✅ | [lib-object-from-entries.ts](conformance/lib-object-from-entries.ts) | `TnFromEntries` → dynamic object |
|
|
292
|
+
| `Object.hasOwn` / `defineProperty` / `getOwnPropertyNames` | ✅ | [lib-object-own.ts](conformance/lib-object-own.ts) | Maps, dynamic objects and typed objects (literal keys); `{ value }` descriptors |
|
|
293
|
+
|
|
294
|
+
### `String`
|
|
295
|
+
|
|
296
|
+
| API | Status | Probe | Notes |
|
|
297
|
+
| --------------------------------------------------------- | :----: | ---------------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
298
|
+
| Template literals | ✅ | [syntax-template-literals.ts](conformance/syntax-template-literals.ts) | Backtick strings with `${expr}` interpolation |
|
|
299
|
+
| Tagged templates | ✅ | [syntax-tagged-templates.ts](conformance/syntax-tagged-templates.ts) | Desugared to `tag([...strings], ...values)` |
|
|
300
|
+
| `toUpperCase` / `toLowerCase` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
|
|
301
|
+
| `trim` / `trimStart` / `trimEnd` | ✅ | [lib-string-basics.ts](conformance/lib-string-basics.ts) | Via `strings` package |
|
|
302
|
+
| `split` / `join` | ✅ | [lib-string-split-join.ts](conformance/lib-string-split-join.ts) | Via `strings` package |
|
|
303
|
+
| `includes` / `startsWith` / `endsWith` / `indexOf` | ✅ | [lib-string-search.ts](conformance/lib-string-search.ts) | Via `strings` package |
|
|
304
|
+
| `replace` / `replaceAll` (string pattern) | ✅ | [lib-string-replace.ts](conformance/lib-string-replace.ts) | Via `strings` package |
|
|
305
|
+
| `replace` / `replaceAll` (RegExp, `$1`/`$&`, fn replacer) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `/g` vs first match, `$1`/`$&` patterns, function replacers |
|
|
306
|
+
| `charAt` / `substring` / `slice` | ✅ | [lib-string-slice.ts](conformance/lib-string-slice.ts) | Direct Go string indexing/slicing |
|
|
307
|
+
| `charCodeAt` / `String.fromCharCode` | ✅ | [lib-string-char-codes.ts](conformance/lib-string-char-codes.ts) | `charCodeAt` reads the byte; `String.fromCharCode` → `string(rune(n))` |
|
|
308
|
+
| `concat` / `repeat` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Concatenation and `strings.Repeat` |
|
|
309
|
+
| `padStart` / `padEnd` | ✅ | [lib-string-pad-repeat.ts](conformance/lib-string-pad-repeat.ts) | Via `strings.Repeat` |
|
|
310
|
+
| `localeCompare` | ✅ | [lib-string-compare.ts](conformance/lib-string-compare.ts) | `strings.Compare` → -1/0/1 |
|
|
311
|
+
| `match` / `matchAll` / `search` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Via `regexp` package (`String.match` with groups) |
|
|
312
|
+
| `at` (negative indices) | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
|
|
313
|
+
| Unicode length / iteration | ✅ | [lib-string-unicode.ts](conformance/lib-string-unicode.ts) | `.length` counts runes; `[...str]` spreads runes |
|
|
314
|
+
| `String.raw` | ✅ | [lib-string-raw.ts](conformance/lib-string-raw.ts) | Raw template text with values interpolated |
|
|
315
|
+
| `normalize` | ❌ | — | Unicode normalization; no probe yet |
|
|
316
|
+
|
|
317
|
+
### `Array`
|
|
318
|
+
|
|
319
|
+
| API | Status | Probe | Notes |
|
|
320
|
+
| --------------------------------------------------------------------------- | :----: | ---------------------------------------------------------------------------- | ----------------------------------- |
|
|
321
|
+
| `push` / `pop` | ✅ | [lib-array-push-pop.ts](conformance/lib-array-push-pop.ts) | Basic stack operations |
|
|
322
|
+
| `shift` / `unshift` | ✅ | [lib-array-shift-unshift.ts](conformance/lib-array-shift-unshift.ts) | Queue operations |
|
|
323
|
+
| `join` / `reverse` | ✅ | [lib-array-reverse-join.ts](conformance/lib-array-reverse-join.ts) | `join()` defaults to `","`; `reverse` reverses in place and returns the array |
|
|
324
|
+
| `slice` | ✅ | [lib-array-slice.ts](conformance/lib-array-slice.ts) | Negative indices count from the end |
|
|
325
|
+
| `splice` | ✅ | [lib-array-splice.ts](conformance/lib-array-splice.ts) | Removes and returns elements in place, inserting extra arguments |
|
|
326
|
+
| `sort` (default, lexicographic) | ✅ | [semantics-default-sort.ts](conformance/semantics-default-sort.ts) | String sort by default |
|
|
327
|
+
| `sort` (comparator) | ✅ | [lib-array-sort-comparator.ts](conformance/lib-array-sort-comparator.ts) | Comparator lowered into `sort.SliceStable` |
|
|
328
|
+
| `flat` / `flatMap` | ✅ | [lib-array-flat-flatmap.ts](conformance/lib-array-flat-flatmap.ts) | One-level `flat`; `flatMap` appends callback results |
|
|
329
|
+
| `at` | ✅ | [lib-array-at.ts](conformance/lib-array-at.ts) | Supports negative indices |
|
|
330
|
+
| `fill` | ✅ | [lib-array-fill.ts](conformance/lib-array-fill.ts) | `new Array<T>(n)` → `make([]T, n)`; `fill` assigns in place |
|
|
331
|
+
| `Array.from` | ✅ | [lib-array-from.ts](conformance/lib-array-from.ts) | Array-likes read `length`; the callback gets the index |
|
|
332
|
+
| `Array.isArray` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Type check on values |
|
|
333
|
+
| `map` / `filter` / `reduce` | ✅ | [lib-array-map-filter-reduce.ts](conformance/lib-array-map-filter-reduce.ts) | Incl. chaining and object arrays |
|
|
334
|
+
| `some` / `every` | ✅ | [lib-array-some-every.ts](conformance/lib-array-some-every.ts) | Predicate quantifiers |
|
|
335
|
+
| `find` / `findIndex` / `findLast` / `findLastIndex` | ✅ | [lib-array-find.ts](conformance/lib-array-find.ts) | `findLast`/`findLastIndex` search from the end |
|
|
336
|
+
| `forEach` | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Block-body callbacks; `Map.forEach` |
|
|
337
|
+
| `includes` / `indexOf` / `lastIndexOf` | ✅ | [lib-array-search.ts](conformance/lib-array-search.ts) | `lastIndexOf` searches from the end |
|
|
338
|
+
| `entries` / `keys` / `values` | ✅ | [lib-array-entries.ts](conformance/lib-array-entries.ts) | `[index, value]` pairs destructured in `for...of` |
|
|
339
|
+
| `length` truncation (`arr.length = 0`) | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Clear via length assignment |
|
|
340
|
+
| `filter(Boolean)` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Constructor as predicate |
|
|
341
|
+
| `concat` | ✅ | [lib-array-concat.ts](conformance/lib-array-concat.ts) | Arrays flattened one level, values appended |
|
|
342
|
+
| `reduceRight` | ✅ | [lib-array-reduce-right.ts](conformance/lib-array-reduce-right.ts) | `reduce` over a reversed copy |
|
|
343
|
+
| `copyWithin` | ✅ | [lib-array-copy-within.ts](conformance/lib-array-copy-within.ts) | Go `copy` (overlap-safe) |
|
|
344
|
+
| Change-preserving copies (`toSorted` / `toReversed` / `with`) | ✅ | [lib-array-copies.ts](conformance/lib-array-copies.ts) | Clone, then sort / reverse / set |
|
|
345
|
+
| `toSpliced` | ✅ | [lib-array-to-spliced.ts](conformance/lib-array-to-spliced.ts) | `slices.Concat` of the kept parts |
|
|
346
|
+
|
|
347
|
+
### `Map` / `Set`
|
|
348
|
+
|
|
349
|
+
| API | Status | Probe | Notes |
|
|
350
|
+
| -------------------------------------------------------- | :----: | ------------------------------------------------------------------ | ------------------------------------------------------- |
|
|
351
|
+
| `Map` (`set` / `get` / `has` / `delete` / `size`) | ✅ | [lib-map.ts](conformance/lib-map.ts) | `Map<K, V>` → Go `map[K]V`; constructor with entries |
|
|
352
|
+
| `Map` iteration (`for...of`, destructuring) | ✅ | [lib-map-iteration.ts](conformance/lib-map-iteration.ts) | Key/value iteration, `Object.entries()` unwrapping |
|
|
353
|
+
| `Set` (`add` / `has` / `delete` / `size`) | ✅ | [lib-set.ts](conformance/lib-set.ts) | `Set<T>` → Go `map[T]struct{}`; constructor with values |
|
|
354
|
+
| `Set` iteration / spread | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | `for...of`, `[...set]` |
|
|
355
|
+
| `Map.clear` / `Set.clear` | ✅ | [lib-map-clear.ts](conformance/lib-map-clear.ts) | `TnMap.Clear()` |
|
|
356
|
+
| `WeakMap` / `WeakSet` | ✅ | [lib-weak-collections.ts](conformance/lib-weak-collections.ts) | Same as `Map` / `Set` (weakness is not observable) |
|
|
357
|
+
| Set operations (`union` / `intersection` / `difference`) | ✅ | [lib-set-operations.ts](conformance/lib-set-operations.ts) | Plus `symmetricDifference` / `isSubsetOf` / `isSupersetOf` / `isDisjointFrom` |
|
|
358
|
+
|
|
359
|
+
### `Number`
|
|
360
|
+
|
|
361
|
+
| API | Status | Probe | Notes |
|
|
362
|
+
| ------------------------------------------------- | :----: | -------------------------------------------------------- | -------------------------------------------------------- |
|
|
363
|
+
| `toString` (incl. radix) | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | Universal `toString()` via `fmt.Sprintf` for any type |
|
|
364
|
+
| `toFixed` | ✅ | [lib-number-format.ts](conformance/lib-number-format.ts) | `n.toFixed(2)` via `strconv.FormatFloat` |
|
|
365
|
+
| `parseInt` / `parseFloat` / `Number()` | ✅ | [lib-number-parse.ts](conformance/lib-number-parse.ts) | Mapped to Go's `strconv` package |
|
|
366
|
+
| `Number.isInteger` / `isNaN` / `MAX_SAFE_INTEGER` | ✅ | [lib-number-checks.ts](conformance/lib-number-checks.ts) | Number predicates and constants |
|
|
367
|
+
| `Number.EPSILON` / `isFinite` / `toPrecision` | ✅ | [lib-number-misc.ts](conformance/lib-number-misc.ts) | `toPrecision` → `strconv.FormatFloat(x, 'g', n, 64)` |
|
|
368
|
+
| `String()` / `Boolean()` conversions | ✅ | [lib-conversions.ts](conformance/lib-conversions.ts) | JS formatting / truthiness |
|
|
369
|
+
|
|
370
|
+
### `Date`
|
|
371
|
+
|
|
372
|
+
| API | Status | Probe | Notes |
|
|
373
|
+
| ------------------------------------------------ | :----: | ---------------------------------------------- | ----------------------------- |
|
|
374
|
+
| `new Date()` / `getTime` / `toISOString` | ✅ | [lib-date.ts](conformance/lib-date.ts) | `new Date(ms)` → `time.UnixMilli`; `getTime`/`toISOString` mapped to `time.Time` |
|
|
375
|
+
| `Date.now()` | ✅ | [lib-date-now.ts](conformance/lib-date-now.ts) | `time.Now().UnixMilli()` |
|
|
376
|
+
| Component getters (`getFullYear`, `getMonth`, …) | ✅ | [lib-date-getters.ts](conformance/lib-date-getters.ts) | Local and `getUTC*` getters, `Date.UTC` |
|
|
377
|
+
|
|
378
|
+
### `RegExp`
|
|
379
|
+
|
|
380
|
+
| API | Status | Probe | Notes |
|
|
381
|
+
| ------------------------------------------------------ | :----: | -------------------------------------------------------------------- | --------------------------------------------------- |
|
|
382
|
+
| Regex literals | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | `/pattern/flags` transpiled to `regexp.MustCompile` |
|
|
383
|
+
| `new RegExp()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Constructor with optional flags |
|
|
384
|
+
| `test()` | ✅ | [lib-regex-test.ts](conformance/lib-regex-test.ts) | Mapped to `regexp.MatchString` |
|
|
385
|
+
| `exec()` (groups) | ✅ | [lib-regex-groups.ts](conformance/lib-regex-groups.ts) | Mapped to `regexp.FindStringSubmatch` |
|
|
386
|
+
| Flags (`i`, `m`) | ✅ | [lib-regex-flags.ts](conformance/lib-regex-flags.ts) | Case-insensitive, multiline |
|
|
387
|
+
| Backreferences | ✅ | [lib-regex-backreference.ts](conformance/lib-regex-backreference.ts) | Backreference patterns run on a small backtracking engine |
|
|
388
|
+
| Named groups | ✅ | [lib-regex-named-groups.ts](conformance/lib-regex-named-groups.ts) | `(?<name>` → `(?P<name>`; `exec` returns a match with `.groups` |
|
|
389
|
+
| Global `exec` loop (`/g` + `lastIndex`) | ✅ | [lib-regex-global-exec.ts](conformance/lib-regex-global-exec.ts) | /g regexes carry `lastIndex` state in the `TnRegex` wrapper |
|
|
390
|
+
| Lookbehind | ✅ | [lib-regex-lookbehind.ts](conformance/lib-regex-lookbehind.ts) | Lookaround patterns run on the backtracking engine |
|
|
391
|
+
| Remaining flags (`s` / `u` / `y`) & `source` / `flags` | ✅ | [lib-regex-more-flags.ts](conformance/lib-regex-more-flags.ts) | Sticky matching, `\u{…}` escapes, `lastIndex` / `source` / `flags` / flag getters |
|
|
392
|
+
| `split` with RegExp | ✅ | [lib-regex-split.ts](conformance/lib-regex-split.ts) | `re.Split(s, -1)` |
|
|
393
|
+
|
|
394
|
+
### `Promise` / timers
|
|
395
|
+
|
|
396
|
+
| API | Status | Probe | Notes |
|
|
397
|
+
| ---------------------------------------------------- | :----: | ------------------------------------------------------------ | ------------------------------------------------------------------- |
|
|
398
|
+
| `Promise` constructor / `.then` | ✅ | [syntax-promise-then.ts](conformance/syntax-promise-then.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
|
|
399
|
+
| `Promise.all` | ✅ | [syntax-promise-all.ts](conformance/syntax-promise-all.ts) | Channel lowering works (see [Async & timing](#async--timing)) |
|
|
400
|
+
| `Promise.resolve` | ✅ | [lib-promise-resolve.ts](conformance/lib-promise-resolve.ts) | Buffered channel holding the value |
|
|
401
|
+
| `Promise.reject` / `.catch` / `.finally` | ✅ | [lib-promise-catch.ts](conformance/lib-promise-catch.ts) | Rejected promises are closed channels with a reason; `await` rethrows |
|
|
402
|
+
| `Promise.race` / `allSettled` / `any` | ✅ | [lib-promise-combinators.ts](conformance/lib-promise-combinators.ts) | Goroutine per promise; first settled / all settled / first fulfilled |
|
|
403
|
+
| `clearTimeout` | ✅ | [lib-timers.ts](conformance/lib-timers.ts) | `TnClearTimeout` stops the timer |
|
|
404
|
+
| `setInterval` / `clearInterval` | ✅ | [lib-set-interval.ts](conformance/lib-set-interval.ts) | `time.Ticker`; the process lives until cleared |
|
|
405
|
+
| `queueMicrotask` | ✅ | [lib-queue-microtask.ts](conformance/lib-queue-microtask.ts) | Runs after the current synchronous code (end of main or a timer callback) |
|
|
406
|
+
| `setTimeout` | ✅ | [lib-set-timeout.ts](conformance/lib-set-timeout.ts) | Lowered to `time.AfterFunc` (see [Async & timing](#async--timing)) |
|
|
407
|
+
|
|
408
|
+
### Misc globals
|
|
409
|
+
|
|
410
|
+
| API | Status | Probe | Notes |
|
|
411
|
+
| ------------------------------------------- | :----: | ------------------------------------------------------------------ | ---------------------------------------- |
|
|
412
|
+
| `assert` | ✅ | [lib-console-log.ts](conformance/lib-console-log.ts) | Transpiled to `panic` on failure |
|
|
413
|
+
| `process.argv` / `process.platform` | ✅ | [lib-process.ts](conformance/lib-process.ts) | Mapped to `os.Args` / `runtime.GOOS` |
|
|
414
|
+
| `process.env` | ✅ | [syntax-top-level-scope.ts](conformance/syntax-top-level-scope.ts) | Environment variable access |
|
|
415
|
+
| `process.exit` | ✅ | [lib-process-exit.ts](conformance/lib-process-exit.ts) | `os.Exit` |
|
|
416
|
+
| `process.cwd()` | ✅ | [lib-process-cwd.ts](conformance/lib-process-cwd.ts) | `os.Getwd()` |
|
|
417
|
+
| `Infinity` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.Inf(1)` |
|
|
418
|
+
| Global `isNaN` / `isFinite` | ✅ | [lib-globals.ts](conformance/lib-globals.ts) | `math.IsNaN` / `math.IsInf` |
|
|
419
|
+
| `encodeURIComponent` / `decodeURIComponent` | ✅ | [lib-uri.ts](conformance/lib-uri.ts) | `TnEncodeURIComponent` / `url.PathUnescape` |
|
|
420
|
+
| `structuredClone` | ✅ | [lib-structured-clone.ts](conformance/lib-structured-clone.ts) | Reflection deep copy |
|
|
421
|
+
| `globalThis` | ✅ | [lib-global-this.ts](conformance/lib-global-this.ts) | `globalThis.x` is the global `x`; `(globalThis as any)` is a dynamic object |
|
|
422
|
+
|
|
423
|
+
### Node builtins (`node:*`)
|
|
424
|
+
|
|
425
|
+
| Module | Status | Probe | Notes |
|
|
426
|
+
| ------------------------------------------------------------------------------------ | :----: | ------------------------------------------------ | ----------------------------------------------------- |
|
|
427
|
+
| `node:path` (`join`, `dirname`, `basename`, `extname`, `resolve`) | ✅ | [lib-node-path.ts](conformance/lib-node-path.ts) | Mapped to Go `path`/`filepath` |
|
|
428
|
+
| `node:fs` (`read/write/append/exists/mkdir/readdir/copy/rm/unlink`) | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | Via Go helpers |
|
|
429
|
+
| `node:url` (`fileURLToPath`, `pathToFileURL`) | ✅ | [lib-node-url.ts](conformance/lib-node-url.ts) | `TnFileURLToPath` / `TnPathToFileURL` |
|
|
430
|
+
| `node:os` (`platform`, `homedir`, `tmpdir`) | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | `platform()` covered; `homedir`/`tmpdir` unprobed |
|
|
431
|
+
| `node:child_process` (`exec`, `execSync`, `spawnSync`, `spawnInherit`) | ✅ | [lib-node-fs.ts](conformance/lib-node-fs.ts) | Sync API shape, stdio-inherit runs |
|
|
432
|
+
| `node:readline` (`question`) | ❌ | — | Declared (TypeNative sync extension) but no probe yet |
|
|
433
|
+
| `node:assert` / `node:assert/strict` | ❌ | — | Undeclared; global `assert` is mapped to `panic` |
|
|
434
|
+
| `node:async_hooks` | ❌ | — | Undeclared; unsupported |
|
|
435
|
+
| `node:buffer` | ❌ | — | Undeclared; unsupported |
|
|
436
|
+
| `node:cluster` | ❌ | — | Undeclared; unsupported |
|
|
437
|
+
| `node:console` | ❌ | — | Undeclared; global `console` methods are mapped |
|
|
438
|
+
| `node:constants` | ❌ | — | Undeclared; unsupported |
|
|
439
|
+
| `node:crypto` | ❌ | — | Undeclared; unsupported |
|
|
440
|
+
| `node:dgram` | ❌ | — | Undeclared; unsupported |
|
|
441
|
+
| `node:diagnostics_channel` | ❌ | — | Undeclared; unsupported |
|
|
442
|
+
| `node:dns` / `node:dns/promises` | ❌ | — | Undeclared; unsupported |
|
|
443
|
+
| `node:domain` | ❌ | — | Deprecated upstream; undeclared |
|
|
444
|
+
| `node:events` | ❌ | — | Undeclared; unsupported |
|
|
445
|
+
| `node:fs/promises` | ❌ | — | Undeclared; sync `node:fs` subset only |
|
|
446
|
+
| `node:http` | ❌ | — | Undeclared; unsupported |
|
|
447
|
+
| `node:http2` | ❌ | — | Undeclared; unsupported |
|
|
448
|
+
| `node:https` | ❌ | — | Undeclared; unsupported |
|
|
449
|
+
| `node:inspector` / `node:inspector/promises` | ❌ | — | Undeclared; unsupported |
|
|
450
|
+
| `node:module` | ❌ | — | Undeclared; unsupported |
|
|
451
|
+
| `node:net` | ❌ | — | Undeclared; unsupported |
|
|
452
|
+
| `node:path/posix` / `node:path/win32` | ❌ | — | Undeclared; unsupported |
|
|
453
|
+
| `node:perf_hooks` | ❌ | — | Undeclared; unsupported |
|
|
454
|
+
| `node:process` | ❌ | — | Undeclared; global `process` partially mapped |
|
|
455
|
+
| `node:punycode` | ❌ | — | Deprecated upstream; undeclared |
|
|
456
|
+
| `node:querystring` | ❌ | — | Undeclared; unsupported |
|
|
457
|
+
| `node:readline/promises` | ❌ | — | Undeclared; unsupported |
|
|
458
|
+
| `node:repl` | ❌ | — | Undeclared; unsupported |
|
|
459
|
+
| `node:sea` | ❌ | — | Undeclared; unsupported (`node:`-only module) |
|
|
460
|
+
| `node:sqlite` | ❌ | — | Undeclared; unsupported (`node:`-only module) |
|
|
461
|
+
| `node:stream` / `node:stream/consumers` / `node:stream/promises` / `node:stream/web` | ❌ | — | Undeclared; unsupported |
|
|
462
|
+
| `node:string_decoder` | ❌ | — | Undeclared; unsupported |
|
|
463
|
+
| `node:sys` | ❌ | — | Deprecated alias of `node:util`; undeclared |
|
|
464
|
+
| `node:test` / `node:test/reporters` | ❌ | — | Undeclared; unsupported (`node:`-only module) |
|
|
465
|
+
| `node:timers` / `node:timers/promises` | ❌ | — | Undeclared; unsupported |
|
|
466
|
+
| `node:tls` | ❌ | — | Undeclared; unsupported |
|
|
467
|
+
| `node:trace_events` | ❌ | — | Undeclared; unsupported |
|
|
468
|
+
| `node:tty` | ❌ | — | Undeclared; unsupported |
|
|
469
|
+
| `node:util` / `node:util/types` | ❌ | — | Undeclared; unsupported |
|
|
470
|
+
| `node:v8` | ❌ | — | Undeclared; unsupported |
|
|
471
|
+
| `node:vm` | ❌ | — | Undeclared; unsupported |
|
|
472
|
+
| `node:wasi` | ❌ | — | Undeclared; unsupported |
|
|
473
|
+
| `node:worker_threads` | ❌ | — | Undeclared; unsupported |
|
|
474
|
+
| `node:zlib` | ❌ | — | Undeclared; unsupported |
|
|
475
|
+
|
|
476
|
+
### Go bridges (`go:*`)
|
|
477
|
+
|
|
478
|
+
| Module | Status | Probe | Notes |
|
|
479
|
+
| ----------------------------------- | :----: | ------------------------------------------------------ | ----------------------------------------------------------------------------- |
|
|
480
|
+
| `go:fmt` (`Println`, `Sprintf`) | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | Direct Go package access |
|
|
481
|
+
| `go:strings` (`ToUpper`, `ToLower`) | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | Direct Go package access |
|
|
482
|
+
| `go:strconv` (`FormatBool`) | ✅ | [syntax-import-go.ts](conformance/syntax-import-go.ts) | Direct Go package access |
|
|
483
|
+
| `go:archive/tar` | ❌ | — | tar archive read/write; not declared in types, no probe yet |
|
|
484
|
+
| `go:archive/zip` | ❌ | — | ZIP archive read/write; not declared in types, no probe yet |
|
|
485
|
+
| `go:bufio` | ❌ | — | Buffered I/O; not declared in types, no probe yet |
|
|
486
|
+
| `go:bytes` | ❌ | — | Byte-slice utilities; not declared in types, no probe yet |
|
|
487
|
+
| `go:cmp` | ❌ | — | Ordered comparison primitives; not declared in types, no probe yet |
|
|
488
|
+
| `go:compress/bzip2` | ❌ | — | bzip2 decompression (read-only); not declared in types, no probe yet |
|
|
489
|
+
| `go:compress/flate` | ❌ | — | DEFLATE compression; not declared in types, no probe yet |
|
|
490
|
+
| `go:compress/gzip` | ❌ | — | gzip read/write; not declared in types, no probe yet |
|
|
491
|
+
| `go:compress/lzw` | ❌ | — | LZW compression (GIF/PDF/TIFF); not declared in types, no probe yet |
|
|
492
|
+
| `go:compress/zlib` | ❌ | — | zlib read/write; not declared in types, no probe yet |
|
|
493
|
+
| `go:container/heap` | ❌ | — | Heap / priority queue; not declared in types, no probe yet |
|
|
494
|
+
| `go:container/list` | ❌ | — | Doubly linked list; not declared in types, no probe yet |
|
|
495
|
+
| `go:container/ring` | ❌ | — | Circular list; not declared in types, no probe yet |
|
|
496
|
+
| `go:context` | ❌ | — | Cancellation and deadlines; not declared in types, no probe yet |
|
|
497
|
+
| `go:crypto` | ❌ | — | Crypto constants and algorithm selection; not declared in types, no probe yet |
|
|
498
|
+
| `go:crypto/aes` | ❌ | — | AES encryption; not declared in types, no probe yet |
|
|
499
|
+
| `go:crypto/cipher` | ❌ | — | Block cipher modes (GCM, CBC, CTR); not declared in types, no probe yet |
|
|
500
|
+
| `go:crypto/des` | ❌ | — | DES / triple DES (deprecated); not declared in types, no probe yet |
|
|
501
|
+
| `go:crypto/dsa` | ❌ | — | DSA signatures (deprecated); not declared in types, no probe yet |
|
|
502
|
+
| `go:crypto/ecdh` | ❌ | — | ECDH key exchange; not declared in types, no probe yet |
|
|
503
|
+
| `go:crypto/ecdsa` | ❌ | — | ECDSA signatures; not declared in types, no probe yet |
|
|
504
|
+
| `go:crypto/ed25519` | ❌ | — | Ed25519 signatures; not declared in types, no probe yet |
|
|
505
|
+
| `go:crypto/elliptic` | ❌ | — | Elliptic curves (legacy; use ecdh/ecdsa); not declared in types, no probe yet |
|
|
506
|
+
| `go:crypto/fips140` | ❌ | — | FIPS 140-3 mode controls; not declared in types, no probe yet |
|
|
507
|
+
| `go:crypto/hkdf` | ❌ | — | HKDF key derivation; not declared in types, no probe yet |
|
|
508
|
+
| `go:crypto/hmac` | ❌ | — | HMAC keyed hashing; not declared in types, no probe yet |
|
|
509
|
+
| `go:crypto/hpke` | ❌ | — | HPKE encryption (RFC 9180); not declared in types, no probe yet |
|
|
510
|
+
| `go:crypto/md5` | ❌ | — | MD5 hash; not declared in types, no probe yet |
|
|
511
|
+
| `go:crypto/mlkem` | ❌ | — | ML-KEM post-quantum key encapsulation; not declared in types, no probe yet |
|
|
512
|
+
| `go:crypto/mlkem/mlkemtest` | ❌ | — | ML-KEM test vectors helper; not declared in types, no probe yet |
|
|
513
|
+
| `go:crypto/pbkdf2` | ❌ | — | PBKDF2 key derivation; not declared in types, no probe yet |
|
|
514
|
+
| `go:crypto/rand` | ❌ | — | Cryptographically secure random bytes; not declared in types, no probe yet |
|
|
515
|
+
| `go:crypto/rc4` | ❌ | — | RC4 stream cipher (deprecated); not declared in types, no probe yet |
|
|
516
|
+
| `go:crypto/rsa` | ❌ | — | RSA signatures / encryption; not declared in types, no probe yet |
|
|
517
|
+
| `go:crypto/sha1` | ❌ | — | SHA-1 hash; not declared in types, no probe yet |
|
|
518
|
+
| `go:crypto/sha256` | ❌ | — | SHA-224 / SHA-256 hashes; not declared in types, no probe yet |
|
|
519
|
+
| `go:crypto/sha3` | ❌ | — | SHA-3 / SHAKE hashes; not declared in types, no probe yet |
|
|
520
|
+
| `go:crypto/sha512` | ❌ | — | SHA-384 / SHA-512 family hashes; not declared in types, no probe yet |
|
|
521
|
+
| `go:crypto/subtle` | ❌ | — | Constant-time comparison primitives; not declared in types, no probe yet |
|
|
522
|
+
| `go:crypto/tls` | ❌ | — | TLS client / server; not declared in types, no probe yet |
|
|
523
|
+
| `go:crypto/x509` | ❌ | — | X.509 certificates and revocation; not declared in types, no probe yet |
|
|
524
|
+
| `go:crypto/x509/pkix` | ❌ | — | X.509 ASN.1/PKIX structures; not declared in types, no probe yet |
|
|
525
|
+
| `go:database/sql` | ❌ | — | SQL database access; not declared in types, no probe yet |
|
|
526
|
+
| `go:database/sql/driver` | ❌ | — | SQL driver interfaces; not declared in types, no probe yet |
|
|
527
|
+
| `go:debug/buildinfo` | ❌ | — | Build info from executables; not declared in types, no probe yet |
|
|
528
|
+
| `go:debug/dwarf` | ❌ | — | DWARF debug info parsing; not declared in types, no probe yet |
|
|
529
|
+
| `go:debug/elf` | ❌ | — | ELF object files; not declared in types, no probe yet |
|
|
530
|
+
| `go:debug/gosym` | ❌ | — | Go symbol tables; not declared in types, no probe yet |
|
|
531
|
+
| `go:debug/macho` | ❌ | — | Mach-O object files; not declared in types, no probe yet |
|
|
532
|
+
| `go:debug/pe` | ❌ | — | PE (Windows) object files; not declared in types, no probe yet |
|
|
533
|
+
| `go:debug/plan9obj` | ❌ | — | Plan 9 object files; not declared in types, no probe yet |
|
|
534
|
+
| `go:embed` | ❌ | — | Files embedded via //go:embed; not declared in types, no probe yet |
|
|
535
|
+
| `go:encoding` | ❌ | — | Shared encoding interfaces; not declared in types, no probe yet |
|
|
536
|
+
| `go:encoding/ascii85` | ❌ | — | ascii85 encoding; not declared in types, no probe yet |
|
|
537
|
+
| `go:encoding/asn1` | ❌ | — | ASN.1 DER encoding; not declared in types, no probe yet |
|
|
538
|
+
| `go:encoding/base32` | ❌ | — | base32 encoding; not declared in types, no probe yet |
|
|
539
|
+
| `go:encoding/base64` | ❌ | — | base64 encoding; not declared in types, no probe yet |
|
|
540
|
+
| `go:encoding/binary` | ❌ | — | Binary packing / varints; not declared in types, no probe yet |
|
|
541
|
+
| `go:encoding/csv` | ❌ | — | CSV read/write; not declared in types, no probe yet |
|
|
542
|
+
| `go:encoding/gob` | ❌ | — | Go binary serialization; not declared in types, no probe yet |
|
|
543
|
+
| `go:encoding/hex` | ❌ | — | hex encoding; not declared in types, no probe yet |
|
|
544
|
+
| `go:encoding/json` | ❌ | — | JSON encode/decode; not declared in types, no probe yet |
|
|
545
|
+
| `go:encoding/pem` | ❌ | — | PEM encoding; not declared in types, no probe yet |
|
|
546
|
+
| `go:encoding/xml` | ❌ | — | XML read/write; not declared in types, no probe yet |
|
|
547
|
+
| `go:errors` | ❌ | — | Error creation / wrapping / inspection; not declared in types, no probe yet |
|
|
548
|
+
| `go:expvar` | ❌ | — | Public process variables; not declared in types, no probe yet |
|
|
549
|
+
| `go:flag` | ❌ | — | Command-line flag parsing; not declared in types, no probe yet |
|
|
550
|
+
| `go:go/ast` | ❌ | — | Go syntax tree; not declared in types, no probe yet |
|
|
551
|
+
| `go:go/build` | ❌ | — | Go package build metadata; not declared in types, no probe yet |
|
|
552
|
+
| `go:go/build/constraint` | ❌ | — | Build-tag constraint parsing; not declared in types, no probe yet |
|
|
553
|
+
| `go:go/constant` | ❌ | — | Untyped constant values; not declared in types, no probe yet |
|
|
554
|
+
| `go:go/doc` | ❌ | — | Go doc extraction; not declared in types, no probe yet |
|
|
555
|
+
| `go:go/doc/comment` | ❌ | — | Doc comment parse/print; not declared in types, no probe yet |
|
|
556
|
+
| `go:go/format` | ❌ | — | Go source formatting; not declared in types, no probe yet |
|
|
557
|
+
| `go:go/importer` | ❌ | — | Export-data type importer; not declared in types, no probe yet |
|
|
558
|
+
| `go:go/parser` | ❌ | — | Go source parser; not declared in types, no probe yet |
|
|
559
|
+
| `go:go/printer` | ❌ | — | Go AST printer; not declared in types, no probe yet |
|
|
560
|
+
| `go:go/scanner` | ❌ | — | Go tokenizer; not declared in types, no probe yet |
|
|
561
|
+
| `go:go/token` | ❌ | — | Go tokens / positions; not declared in types, no probe yet |
|
|
562
|
+
| `go:go/types` | ❌ | — | Go type checker; not declared in types, no probe yet |
|
|
563
|
+
| `go:go/version` | ❌ | — | Go version comparison; not declared in types, no probe yet |
|
|
564
|
+
| `go:hash` | ❌ | — | Hash function interface; not declared in types, no probe yet |
|
|
565
|
+
| `go:hash/adler32` | ❌ | — | Adler-32 checksum; not declared in types, no probe yet |
|
|
566
|
+
| `go:hash/crc32` | ❌ | — | CRC-32 checksum; not declared in types, no probe yet |
|
|
567
|
+
| `go:hash/crc64` | ❌ | — | CRC-64 checksum; not declared in types, no probe yet |
|
|
568
|
+
| `go:hash/fnv` | ❌ | — | FNV-1 / FNV-1a hash; not declared in types, no probe yet |
|
|
569
|
+
| `go:hash/maphash` | ❌ | — | Seeded string hashing; not declared in types, no probe yet |
|
|
570
|
+
| `go:html` | ❌ | — | HTML escaping; not declared in types, no probe yet |
|
|
571
|
+
| `go:html/template` | ❌ | — | HTML templating (auto-escaped); not declared in types, no probe yet |
|
|
572
|
+
| `go:image` | ❌ | — | 2D image interface; not declared in types, no probe yet |
|
|
573
|
+
| `go:image/color` | ❌ | — | Color types; not declared in types, no probe yet |
|
|
574
|
+
| `go:image/color/palette` | ❌ | — | Standard color palettes; not declared in types, no probe yet |
|
|
575
|
+
| `go:image/draw` | ❌ | — | Image compositing; not declared in types, no probe yet |
|
|
576
|
+
| `go:image/gif` | ❌ | — | GIF decode/encode; not declared in types, no probe yet |
|
|
577
|
+
| `go:image/jpeg` | ❌ | — | JPEG decode/encode; not declared in types, no probe yet |
|
|
578
|
+
| `go:image/png` | ❌ | — | PNG decode/encode; not declared in types, no probe yet |
|
|
579
|
+
| `go:index/suffixarray` | ❌ | — | Suffix-array substring search; not declared in types, no probe yet |
|
|
580
|
+
| `go:io` | ❌ | — | Core I/O interfaces (Reader/Writer); not declared in types, no probe yet |
|
|
581
|
+
| `go:io/fs` | ❌ | — | Filesystem abstraction; not declared in types, no probe yet |
|
|
582
|
+
| `go:io/ioutil` | ❌ | — | Deprecated I/O helpers (Go 1.16); not declared in types, no probe yet |
|
|
583
|
+
| `go:iter` | ❌ | — | Range-over-func iterator types; not declared in types, no probe yet |
|
|
584
|
+
| `go:log` | ❌ | — | Leveled logging to stderr; not declared in types, no probe yet |
|
|
585
|
+
| `go:log/slog` | ❌ | — | Structured logging; not declared in types, no probe yet |
|
|
586
|
+
| `go:log/syslog` | ❌ | — | syslog client (Unix only); not declared in types, no probe yet |
|
|
587
|
+
| `go:maps` | ❌ | — | Generic map utilities; not declared in types, no probe yet |
|
|
588
|
+
| `go:math` | ❌ | — | Float math functions; not declared in types, no probe yet |
|
|
589
|
+
| `go:math/big` | ❌ | — | Arbitrary-precision arithmetic; not declared in types, no probe yet |
|
|
590
|
+
| `go:math/bits` | ❌ | — | Bit counting / manipulation; not declared in types, no probe yet |
|
|
591
|
+
| `go:math/cmplx` | ❌ | — | Complex-number math; not declared in types, no probe yet |
|
|
592
|
+
| `go:math/rand` | ❌ | — | Pseudo-random generator (legacy); not declared in types, no probe yet |
|
|
593
|
+
| `go:math/rand/v2` | ❌ | — | Pseudo-random generator (v2); not declared in types, no probe yet |
|
|
594
|
+
| `go:mime` | ❌ | — | MIME type lookup; not declared in types, no probe yet |
|
|
595
|
+
| `go:mime/multipart` | ❌ | — | multipart/form-data parsing; not declared in types, no probe yet |
|
|
596
|
+
| `go:mime/quotedprintable` | ❌ | — | quoted-printable encoding; not declared in types, no probe yet |
|
|
597
|
+
| `go:net` | ❌ | — | Network I/O (TCP/UDP/Unix sockets); not declared in types, no probe yet |
|
|
598
|
+
| `go:net/http` | ❌ | — | HTTP client / server; not declared in types, no probe yet |
|
|
599
|
+
| `go:net/http/cgi` | ❌ | — | CGI handler support; not declared in types, no probe yet |
|
|
600
|
+
| `go:net/http/cookiejar` | ❌ | — | HTTP cookie storage; not declared in types, no probe yet |
|
|
601
|
+
| `go:net/http/fcgi` | ❌ | — | FastCGI server; not declared in types, no probe yet |
|
|
602
|
+
| `go:net/http/httptest` | ❌ | — | HTTP test helpers; not declared in types, no probe yet |
|
|
603
|
+
| `go:net/http/httptrace` | ❌ | — | HTTP request tracing; not declared in types, no probe yet |
|
|
604
|
+
| `go:net/http/httputil` | ❌ | — | HTTP utilities (reverse proxy); not declared in types, no probe yet |
|
|
605
|
+
| `go:net/http/pprof` | ❌ | — | Profiling endpoints over HTTP; not declared in types, no probe yet |
|
|
606
|
+
| `go:net/mail` | ❌ | — | RFC 5322 address parsing; not declared in types, no probe yet |
|
|
607
|
+
| `go:net/netip` | ❌ | — | IP address / prefix types; not declared in types, no probe yet |
|
|
608
|
+
| `go:net/rpc` | ❌ | — | Go RPC; not declared in types, no probe yet |
|
|
609
|
+
| `go:net/rpc/jsonrpc` | ❌ | — | JSON-RPC codec for net/rpc; not declared in types, no probe yet |
|
|
610
|
+
| `go:net/smtp` | ❌ | — | SMTP client; not declared in types, no probe yet |
|
|
611
|
+
| `go:net/textproto` | ❌ | — | Text-based protocol helpers; not declared in types, no probe yet |
|
|
612
|
+
| `go:net/url` | ❌ | — | URL parsing / building; not declared in types, no probe yet |
|
|
613
|
+
| `go:os` | ❌ | — | OS functions (files, env, process); not declared in types, no probe yet |
|
|
614
|
+
| `go:os/exec` | ❌ | — | External command execution; not declared in types, no probe yet |
|
|
615
|
+
| `go:os/signal` | ❌ | — | OS signal handling; not declared in types, no probe yet |
|
|
616
|
+
| `go:os/user` | ❌ | — | User / group lookup; not declared in types, no probe yet |
|
|
617
|
+
| `go:path` | ❌ | — | Slash-separated path utilities; not declared in types, no probe yet |
|
|
618
|
+
| `go:path/filepath` | ❌ | — | OS-specific file paths; not declared in types, no probe yet |
|
|
619
|
+
| `go:plugin` | ❌ | — | Go plugin loading (cgo; Linux/macOS/BSD); not declared in types, no probe yet |
|
|
620
|
+
| `go:reflect` | ❌ | — | Runtime reflection; not declared in types, no probe yet |
|
|
621
|
+
| `go:regexp` | ❌ | — | Regular expressions (RE2); not declared in types, no probe yet |
|
|
622
|
+
| `go:regexp/syntax` | ❌ | — | Regex syntax parsing; not declared in types, no probe yet |
|
|
623
|
+
| `go:runtime` | ❌ | — | Runtime introspection (GC, goroutines); not declared in types, no probe yet |
|
|
624
|
+
| `go:runtime/coverage` | ❌ | — | Coverage counter writing; not declared in types, no probe yet |
|
|
625
|
+
| `go:runtime/debug` | ❌ | — | Debug controls (stack dump, GC tuning); not declared in types, no probe yet |
|
|
626
|
+
| `go:runtime/metrics` | ❌ | — | Runtime metrics; not declared in types, no probe yet |
|
|
627
|
+
| `go:runtime/pprof` | ❌ | — | CPU / memory profiling; not declared in types, no probe yet |
|
|
628
|
+
| `go:runtime/race` | ❌ | — | Race detector interaction; not declared in types, no probe yet |
|
|
629
|
+
| `go:runtime/trace` | ❌ | — | Execution tracing; not declared in types, no probe yet |
|
|
630
|
+
| `go:slices` | ❌ | — | Generic slice utilities; not declared in types, no probe yet |
|
|
631
|
+
| `go:sort` | ❌ | — | Sorting; not declared in types, no probe yet |
|
|
632
|
+
| `go:structs` | ❌ | — | Struct layout annotations; not declared in types, no probe yet |
|
|
633
|
+
| `go:sync` | ❌ | — | Sync primitives (Mutex, WaitGroup); not declared in types, no probe yet |
|
|
634
|
+
| `go:sync/atomic` | ❌ | — | Atomic memory operations; not declared in types, no probe yet |
|
|
635
|
+
| `go:syscall` | ❌ | — | Raw system call interface; not declared in types, no probe yet |
|
|
636
|
+
| `go:testing` | ❌ | — | Test / benchmark harness; not declared in types, no probe yet |
|
|
637
|
+
| `go:testing/cryptotest` | ❌ | — | FIPS crypto test helpers; not declared in types, no probe yet |
|
|
638
|
+
| `go:testing/fstest` | ❌ | — | In-memory filesystem maps; not declared in types, no probe yet |
|
|
639
|
+
| `go:testing/iotest` | ❌ | — | Reader / writer test shims; not declared in types, no probe yet |
|
|
640
|
+
| `go:testing/quick` | ❌ | — | Property-based testing; not declared in types, no probe yet |
|
|
641
|
+
| `go:testing/slogtest` | ❌ | — | slog handler testing; not declared in types, no probe yet |
|
|
642
|
+
| `go:testing/synctest` | ❌ | — | Deterministic async testing; not declared in types, no probe yet |
|
|
643
|
+
| `go:text/scanner` | ❌ | — | Generic token scanning; not declared in types, no probe yet |
|
|
644
|
+
| `go:text/tabwriter` | ❌ | — | Column-aligned text output; not declared in types, no probe yet |
|
|
645
|
+
| `go:text/template` | ❌ | — | Data-driven text templating; not declared in types, no probe yet |
|
|
646
|
+
| `go:text/template/parse` | ❌ | — | Template parse tree; not declared in types, no probe yet |
|
|
647
|
+
| `go:time` | ❌ | — | Dates, durations, timers; not declared in types, no probe yet |
|
|
648
|
+
| `go:time/tzdata` | ❌ | — | Embedded timezone database; not declared in types, no probe yet |
|
|
649
|
+
| `go:unicode` | ❌ | — | Unicode properties / tables; not declared in types, no probe yet |
|
|
650
|
+
| `go:unicode/utf16` | ❌ | — | UTF-16 encoding; not declared in types, no probe yet |
|
|
651
|
+
| `go:unicode/utf8` | ❌ | — | UTF-8 encoding; not declared in types, no probe yet |
|
|
652
|
+
| `go:unique` | ❌ | — | Interned canonical values; not declared in types, no probe yet |
|
|
653
|
+
| `go:unsafe` | ❌ | — | Unsafe pointers / memory layout; not declared in types, no probe yet |
|
|
654
|
+
| `go:weak` | ❌ | — | Weak pointers; not declared in types, no probe yet |
|
|
655
|
+
|
|
656
|
+
### npm packages
|
|
657
|
+
|
|
658
|
+
| Pattern | Status | Probe | Notes |
|
|
659
|
+
| ------------------------- | :----: | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
660
|
+
| `import { x } from 'pkg'` | ✅ | [syntax-import-npm.ts](conformance/syntax-import-npm.ts) | Mapped to Go module imports (fixture dep in [conformance/package.json](conformance/package.json)) |
|