@tsonic/frontend 0.0.64 → 0.0.65

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.
Files changed (126) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/dependency-graph.d.ts +1 -1
  3. package/dist/dependency-graph.d.ts.map +1 -1
  4. package/dist/dependency-graph.js +1 -1
  5. package/dist/dependency-graph.js.map +1 -1
  6. package/dist/graph/extraction/imports.d.ts +0 -5
  7. package/dist/graph/extraction/imports.d.ts.map +1 -1
  8. package/dist/graph/extraction/imports.js +0 -35
  9. package/dist/graph/extraction/imports.js.map +1 -1
  10. package/dist/graph/extraction/index.d.ts +1 -1
  11. package/dist/graph/extraction/index.d.ts.map +1 -1
  12. package/dist/graph/extraction/index.js +1 -1
  13. package/dist/graph/extraction/index.js.map +1 -1
  14. package/dist/graph/extraction/orchestrator.d.ts.map +1 -1
  15. package/dist/graph/extraction/orchestrator.js +1 -7
  16. package/dist/graph/extraction/orchestrator.js.map +1 -1
  17. package/dist/graph/extraction.d.ts +1 -1
  18. package/dist/graph/extraction.d.ts.map +1 -1
  19. package/dist/graph/extraction.js +1 -1
  20. package/dist/graph/extraction.js.map +1 -1
  21. package/dist/ir/binding/binding-types.d.ts +2 -2
  22. package/dist/ir/binding/binding-types.d.ts.map +1 -1
  23. package/dist/ir/binding-resolution.test.js +24 -48
  24. package/dist/ir/binding-resolution.test.js.map +1 -1
  25. package/dist/ir/bindings-disambiguation.test.js +149 -0
  26. package/dist/ir/bindings-disambiguation.test.js.map +1 -1
  27. package/dist/ir/builder/imports.d.ts.map +1 -1
  28. package/dist/ir/builder/imports.js +6 -10
  29. package/dist/ir/builder/imports.js.map +1 -1
  30. package/dist/ir/builder.test.js +56 -0
  31. package/dist/ir/builder.test.js.map +1 -1
  32. package/dist/ir/converters/expressions/access/access-converter.d.ts.map +1 -1
  33. package/dist/ir/converters/expressions/access/access-converter.js +1 -1
  34. package/dist/ir/converters/expressions/access/access-converter.js.map +1 -1
  35. package/dist/ir/converters/expressions/access/binding-resolution.d.ts +2 -2
  36. package/dist/ir/converters/expressions/access/binding-resolution.d.ts.map +1 -1
  37. package/dist/ir/converters/expressions/access/binding-resolution.js +50 -72
  38. package/dist/ir/converters/expressions/access/binding-resolution.js.map +1 -1
  39. package/dist/ir/converters/expressions/access/member-resolution.d.ts.map +1 -1
  40. package/dist/ir/converters/expressions/access/member-resolution.js +5 -0
  41. package/dist/ir/converters/expressions/access/member-resolution.js.map +1 -1
  42. package/dist/ir/converters/expressions/calls/call-converter.js +3 -3
  43. package/dist/ir/converters/expressions/calls/call-converter.js.map +1 -1
  44. package/dist/ir/type-system/internal/type-converter/references.d.ts.map +1 -1
  45. package/dist/ir/type-system/internal/type-converter/references.js +6 -9
  46. package/dist/ir/type-system/internal/type-converter/references.js.map +1 -1
  47. package/dist/ir/type-system/type-system-call-resolution.d.ts.map +1 -1
  48. package/dist/ir/type-system/type-system-call-resolution.js +109 -3
  49. package/dist/ir/type-system/type-system-call-resolution.js.map +1 -1
  50. package/dist/ir/type-system/type-system-state.d.ts.map +1 -1
  51. package/dist/ir/type-system/type-system-state.js +33 -17
  52. package/dist/ir/type-system/type-system-state.js.map +1 -1
  53. package/dist/ir/type-system/type-system.d.ts.map +1 -1
  54. package/dist/ir/type-system/type-system.js.map +1 -1
  55. package/dist/program/binding-loader.d.ts +3 -3
  56. package/dist/program/binding-loader.d.ts.map +1 -1
  57. package/dist/program/binding-loader.js +47 -23
  58. package/dist/program/binding-loader.js.map +1 -1
  59. package/dist/program/binding-registry.d.ts +7 -0
  60. package/dist/program/binding-registry.d.ts.map +1 -1
  61. package/dist/program/binding-registry.js +52 -1
  62. package/dist/program/binding-registry.js.map +1 -1
  63. package/dist/program/bindings.test.js +168 -0
  64. package/dist/program/bindings.test.js.map +1 -1
  65. package/dist/program/creation.d.ts.map +1 -1
  66. package/dist/program/creation.js +327 -158
  67. package/dist/program/creation.js.map +1 -1
  68. package/dist/program/creation.test.js +198 -19
  69. package/dist/program/creation.test.js.map +1 -1
  70. package/dist/program/metadata.d.ts.map +1 -1
  71. package/dist/program/metadata.js +8 -2
  72. package/dist/program/metadata.js.map +1 -1
  73. package/dist/program/types.d.ts +1 -1
  74. package/dist/program/types.d.ts.map +1 -1
  75. package/dist/resolver/clr-bindings-resolver.d.ts.map +1 -1
  76. package/dist/resolver/clr-bindings-resolver.js +42 -4
  77. package/dist/resolver/clr-bindings-resolver.js.map +1 -1
  78. package/dist/resolver/import-resolution.d.ts +0 -2
  79. package/dist/resolver/import-resolution.d.ts.map +1 -1
  80. package/dist/resolver/import-resolution.js +2 -9
  81. package/dist/resolver/import-resolution.js.map +1 -1
  82. package/dist/resolver.test.js +50 -78
  83. package/dist/resolver.test.js.map +1 -1
  84. package/dist/surface/profiles.d.ts +6 -3
  85. package/dist/surface/profiles.d.ts.map +1 -1
  86. package/dist/surface/profiles.js +178 -29
  87. package/dist/surface/profiles.js.map +1 -1
  88. package/dist/surface/profiles.test.js +100 -19
  89. package/dist/surface/profiles.test.js.map +1 -1
  90. package/dist/validation/features.d.ts.map +1 -1
  91. package/dist/validation/features.js +1 -23
  92. package/dist/validation/features.js.map +1 -1
  93. package/dist/validation/features.test.js +4 -4
  94. package/dist/validation/features.test.js.map +1 -1
  95. package/dist/validation/imports.d.ts.map +1 -1
  96. package/dist/validation/imports.js +7 -16
  97. package/dist/validation/imports.js.map +1 -1
  98. package/dist/validation/imports.test.js +74 -66
  99. package/dist/validation/imports.test.js.map +1 -1
  100. package/dist/validator.maximus.test.js +4 -5
  101. package/dist/validator.maximus.test.js.map +1 -1
  102. package/package.json +2 -2
  103. package/dist/ir/converters/context.d.ts +0 -40
  104. package/dist/ir/converters/context.d.ts.map +0 -1
  105. package/dist/ir/converters/context.js +0 -25
  106. package/dist/ir/converters/context.js.map +0 -1
  107. package/dist/resolver/node-module-aliases.d.ts +0 -6
  108. package/dist/resolver/node-module-aliases.d.ts.map +0 -1
  109. package/dist/resolver/node-module-aliases.js +0 -164
  110. package/dist/resolver/node-module-aliases.js.map +0 -1
  111. package/dist/resolver/node-module-aliases.test.d.ts +0 -2
  112. package/dist/resolver/node-module-aliases.test.d.ts.map +0 -1
  113. package/dist/resolver/node-module-aliases.test.js +0 -64
  114. package/dist/resolver/node-module-aliases.test.js.map +0 -1
  115. package/dist/surface/js-surface-shims.d.ts +0 -3
  116. package/dist/surface/js-surface-shims.d.ts.map +0 -1
  117. package/dist/surface/js-surface-shims.js +0 -332
  118. package/dist/surface/js-surface-shims.js.map +0 -1
  119. package/dist/surface/js-surface-shims.test.d.ts +0 -2
  120. package/dist/surface/js-surface-shims.test.d.ts.map +0 -1
  121. package/dist/surface/js-surface-shims.test.js +0 -53
  122. package/dist/surface/js-surface-shims.test.js.map +0 -1
  123. package/dist/validation/unsupported-utility-types.d.ts +0 -40
  124. package/dist/validation/unsupported-utility-types.d.ts.map +0 -1
  125. package/dist/validation/unsupported-utility-types.js +0 -43
  126. package/dist/validation/unsupported-utility-types.js.map +0 -1
@@ -1,332 +0,0 @@
1
- export const JS_SURFACE_GLOBALS_SHIMS = `
2
- import type { int, long, double } from "@tsonic/core/types.js";
3
- import type { List } from "@tsonic/dotnet/System.Collections.Generic.js";
4
-
5
- declare global {
6
- interface String {
7
- readonly length: int;
8
- toUpperCase(): string;
9
- toLowerCase(): string;
10
- trim(): string;
11
- trimStart(): string;
12
- trimEnd(): string;
13
- substring(start: int, end?: int): string;
14
- slice(start: int, end?: int): string;
15
- indexOf(searchString: string, position?: int): int;
16
- lastIndexOf(searchString: string, position?: int): int;
17
- startsWith(searchString: string, position?: int): boolean;
18
- endsWith(searchString: string, endPosition?: int): boolean;
19
- includes(searchString: string, position?: int): boolean;
20
- replace(searchValue: string, replaceValue: string): string;
21
- replaceAll(searchValue: string, replaceValue: string): string;
22
- repeat(count: int): string;
23
- padStart(targetLength: int, padString?: string): string;
24
- padEnd(targetLength: int, padString?: string): string;
25
- charAt(index: int): string;
26
- charCodeAt(index: int): int;
27
- split(separator: string, limit?: int): List<string>;
28
- at(index: int): string;
29
- concat(...strings: string[]): string;
30
- localeCompare(compareString: string): int;
31
- match(pattern: string | RegExp): List<string> | undefined;
32
- search(pattern: string | RegExp): int;
33
- }
34
-
35
- interface Array<T> {
36
- readonly length: int;
37
- at(index: int): T;
38
- concat(...items: T[]): T[];
39
- every(callback: (value: T) => boolean): boolean;
40
- filter(callback: (value: T) => boolean): T[];
41
- filter(callback: (value: T, index: int) => boolean): T[];
42
- find(callback: (value: T) => boolean): T | undefined;
43
- find(callback: (value: T, index: int) => boolean): T | undefined;
44
- findIndex(callback: (value: T) => boolean): int;
45
- findIndex(callback: (value: T, index: int) => boolean): int;
46
- findLast(callback: (value: T) => boolean): T | undefined;
47
- findLast(callback: (value: T, index: int) => boolean): T | undefined;
48
- findLastIndex(callback: (value: T) => boolean): int;
49
- findLastIndex(callback: (value: T, index: int) => boolean): int;
50
- flat(depth?: int): unknown[];
51
- forEach(callback: (value: T) => void): void;
52
- forEach(callback: (value: T, index: int) => void): void;
53
- includes(searchElement: T): boolean;
54
- includes(searchElement: T, fromIndex?: int): boolean;
55
- indexOf(searchElement: T, fromIndex?: int): int;
56
- join(separator?: string): string;
57
- lastIndexOf(searchElement: T, fromIndex?: int): int;
58
- map<TResult>(callback: (value: T) => TResult): TResult[];
59
- map<TResult>(callback: (value: T, index: int) => TResult): TResult[];
60
- reduce(callback: (previousValue: T, currentValue: T) => T): T;
61
- reduce<TResult>(
62
- callback: (previousValue: TResult, currentValue: T) => TResult,
63
- initialValue: TResult
64
- ): TResult;
65
- reduceRight<TResult>(
66
- callback: (previousValue: TResult, currentValue: T) => TResult,
67
- initialValue: TResult
68
- ): TResult;
69
- slice(start?: int, end?: int): T[];
70
- some(callback: (value: T) => boolean): boolean;
71
- }
72
-
73
- interface ReadonlyArray<T> {
74
- readonly length: int;
75
- at(index: int): T;
76
- concat(...items: T[]): T[];
77
- every(callback: (value: T) => boolean): boolean;
78
- filter(callback: (value: T) => boolean): T[];
79
- filter(callback: (value: T, index: int) => boolean): T[];
80
- find(callback: (value: T) => boolean): T | undefined;
81
- find(callback: (value: T, index: int) => boolean): T | undefined;
82
- findIndex(callback: (value: T) => boolean): int;
83
- findIndex(callback: (value: T, index: int) => boolean): int;
84
- findLast(callback: (value: T) => boolean): T | undefined;
85
- findLast(callback: (value: T, index: int) => boolean): T | undefined;
86
- findLastIndex(callback: (value: T) => boolean): int;
87
- findLastIndex(callback: (value: T, index: int) => boolean): int;
88
- flat(depth?: int): unknown[];
89
- forEach(callback: (value: T) => void): void;
90
- forEach(callback: (value: T, index: int) => void): void;
91
- includes(searchElement: T): boolean;
92
- includes(searchElement: T, fromIndex?: int): boolean;
93
- indexOf(searchElement: T, fromIndex?: int): int;
94
- join(separator?: string): string;
95
- lastIndexOf(searchElement: T, fromIndex?: int): int;
96
- map<TResult>(callback: (value: T) => TResult): TResult[];
97
- map<TResult>(callback: (value: T, index: int) => TResult): TResult[];
98
- reduce(callback: (previousValue: T, currentValue: T) => T): T;
99
- reduce<TResult>(
100
- callback: (previousValue: TResult, currentValue: T) => TResult,
101
- initialValue: TResult
102
- ): TResult;
103
- reduceRight<TResult>(
104
- callback: (previousValue: TResult, currentValue: T) => TResult,
105
- initialValue: TResult
106
- ): TResult;
107
- slice(start?: int, end?: int): T[];
108
- some(callback: (value: T) => boolean): boolean;
109
- }
110
-
111
- interface Console {
112
- log(...data: unknown[]): void;
113
- error(...data: unknown[]): void;
114
- warn(...data: unknown[]): void;
115
- info(...data: unknown[]): void;
116
- debug(...data: unknown[]): void;
117
- }
118
-
119
- const console: Console;
120
-
121
- interface Date {
122
- toString(): string;
123
- toDateString(): string;
124
- toTimeString(): string;
125
- toISOString(): string;
126
- toUTCString(): string;
127
- valueOf(): long;
128
- getTime(): long;
129
- getFullYear(): int;
130
- getMonth(): int;
131
- getDate(): int;
132
- getDay(): int;
133
- getHours(): int;
134
- getMinutes(): int;
135
- getSeconds(): int;
136
- getMilliseconds(): int;
137
- setTime(time: long): long;
138
- setFullYear(year: int, month?: int, date?: int): long;
139
- setMonth(month: int, date?: int): long;
140
- setDate(date: int): long;
141
- setHours(hours: int, minutes?: int, seconds?: int, ms?: int): long;
142
- setMinutes(minutes: int, seconds?: int, ms?: int): long;
143
- setSeconds(seconds: int, ms?: int): long;
144
- setMilliseconds(ms: int): long;
145
- }
146
-
147
- interface DateConstructor {
148
- new (): Date;
149
- new (value: string | number | long): Date;
150
- new (year: int, monthIndex: int, date?: int): Date;
151
- now(): long;
152
- parse(s: string): long;
153
- UTC(year: int, monthIndex: int, date?: int): long;
154
- }
155
-
156
- const Date: DateConstructor;
157
-
158
- interface JSON {
159
- parse<T = unknown>(text: string): T;
160
- stringify(
161
- value: unknown,
162
- replacer?: ((this: unknown, key: string, value: unknown) => unknown) | readonly (number | string)[] | null,
163
- space?: string | number | int
164
- ): string;
165
- }
166
-
167
- const JSON: JSON;
168
-
169
- interface Math {
170
- readonly E: double;
171
- readonly LN10: double;
172
- readonly LN2: double;
173
- readonly LOG2E: double;
174
- readonly LOG10E: double;
175
- readonly PI: double;
176
- readonly SQRT1_2: double;
177
- readonly SQRT2: double;
178
- abs(x: double): double;
179
- acos(x: double): double;
180
- asin(x: double): double;
181
- atan(x: double): double;
182
- atan2(y: double, x: double): double;
183
- ceil(x: double): double;
184
- cos(x: double): double;
185
- exp(x: double): double;
186
- floor(x: double): double;
187
- log(x: double): double;
188
- max(...values: double[]): double;
189
- min(...values: double[]): double;
190
- pow(x: double, y: double): double;
191
- random(): double;
192
- round(x: double): double;
193
- sin(x: double): double;
194
- sqrt(x: double): double;
195
- tan(x: double): double;
196
- trunc(x: double): double;
197
- }
198
-
199
- const Math: Math;
200
-
201
- interface RegExpMatchArray extends Array<string> {
202
- index?: int;
203
- input?: string;
204
- }
205
-
206
- interface RegExp {
207
- exec(string: string): RegExpMatchArray | null;
208
- test(string: string): boolean;
209
- readonly source: string;
210
- readonly global: boolean;
211
- readonly ignoreCase: boolean;
212
- readonly multiline: boolean;
213
- lastIndex: int;
214
- }
215
-
216
- interface RegExpConstructor {
217
- new (pattern: string | RegExp, flags?: string): RegExp;
218
- (pattern: string | RegExp, flags?: string): RegExp;
219
- }
220
-
221
- const RegExp: RegExpConstructor;
222
-
223
- interface Map<K, V> {
224
- readonly size: int;
225
- clear(): void;
226
- delete(key: K): boolean;
227
- forEach(
228
- callbackfn: (value: V, key: K, map: Map<K, V>) => void,
229
- thisArg?: unknown
230
- ): void;
231
- get(key: K): V | undefined;
232
- has(key: K): boolean;
233
- set(key: K, value: V): this;
234
- entries(): IterableIterator<[K, V]>;
235
- keys(): IterableIterator<K>;
236
- values(): IterableIterator<V>;
237
- [Symbol.iterator](): IterableIterator<[K, V]>;
238
- }
239
-
240
- interface MapConstructor {
241
- new (): Map<unknown, unknown>;
242
- new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>;
243
- }
244
-
245
- const Map: MapConstructor;
246
-
247
- interface Set<T> {
248
- readonly size: int;
249
- add(value: T): this;
250
- clear(): void;
251
- delete(value: T): boolean;
252
- forEach(
253
- callbackfn: (value: T, value2: T, set: Set<T>) => void,
254
- thisArg?: unknown
255
- ): void;
256
- has(value: T): boolean;
257
- entries(): IterableIterator<[T, T]>;
258
- keys(): IterableIterator<T>;
259
- values(): IterableIterator<T>;
260
- [Symbol.iterator](): IterableIterator<T>;
261
- }
262
-
263
- interface SetConstructor {
264
- new (): Set<unknown>;
265
- new <T = unknown>(values?: readonly T[] | null): Set<T>;
266
- }
267
-
268
- const Set: SetConstructor;
269
-
270
- function parseInt(str: string, radix?: int): long | undefined;
271
- function parseFloat(str: string): double;
272
- function isFinite(value: double): boolean;
273
- function isNaN(value: double): boolean;
274
- function setTimeout(
275
- handler: (...args: unknown[]) => void,
276
- timeout?: int,
277
- ...args: unknown[]
278
- ): int;
279
- function clearTimeout(id: int): void;
280
- function setInterval(
281
- handler: (...args: unknown[]) => void,
282
- timeout?: int,
283
- ...args: unknown[]
284
- ): int;
285
- function clearInterval(id: int): void;
286
- }
287
-
288
- export {};
289
- `;
290
- export const JS_SURFACE_NODE_MODULE_SHIMS = `
291
- declare module "node:assert" { export { assert } from "@tsonic/nodejs/index.js"; }
292
- declare module "assert" { export { assert } from "@tsonic/nodejs/index.js"; }
293
- declare module "node:buffer" { export { buffer } from "@tsonic/nodejs/index.js"; }
294
- declare module "buffer" { export { buffer } from "@tsonic/nodejs/index.js"; }
295
- declare module "node:child_process" { export { child_process } from "@tsonic/nodejs/index.js"; }
296
- declare module "child_process" { export { child_process } from "@tsonic/nodejs/index.js"; }
297
- declare module "node:crypto" { export { crypto } from "@tsonic/nodejs/index.js"; }
298
- declare module "crypto" { export { crypto } from "@tsonic/nodejs/index.js"; }
299
- declare module "node:dgram" { export { dgram } from "@tsonic/nodejs/index.js"; }
300
- declare module "dgram" { export { dgram } from "@tsonic/nodejs/index.js"; }
301
- declare module "node:dns" { export { dns } from "@tsonic/nodejs/index.js"; }
302
- declare module "dns" { export { dns } from "@tsonic/nodejs/index.js"; }
303
- declare module "node:events" { export { events } from "@tsonic/nodejs/index.js"; }
304
- declare module "events" { export { events } from "@tsonic/nodejs/index.js"; }
305
- declare module "node:fs" { export { fs } from "@tsonic/nodejs/index.js"; }
306
- declare module "fs" { export { fs } from "@tsonic/nodejs/index.js"; }
307
- declare module "node:net" { export { net } from "@tsonic/nodejs/index.js"; }
308
- declare module "net" { export { net } from "@tsonic/nodejs/index.js"; }
309
- declare module "node:os" { export { os } from "@tsonic/nodejs/index.js"; }
310
- declare module "os" { export { os } from "@tsonic/nodejs/index.js"; }
311
- declare module "node:path" { export { path } from "@tsonic/nodejs/index.js"; }
312
- declare module "path" { export { path } from "@tsonic/nodejs/index.js"; }
313
- declare module "node:process" { export { process } from "@tsonic/nodejs/index.js"; }
314
- declare module "process" { export { process } from "@tsonic/nodejs/index.js"; }
315
- declare module "node:querystring" { export { querystring } from "@tsonic/nodejs/index.js"; }
316
- declare module "querystring" { export { querystring } from "@tsonic/nodejs/index.js"; }
317
- declare module "node:readline" { export { readline } from "@tsonic/nodejs/index.js"; }
318
- declare module "readline" { export { readline } from "@tsonic/nodejs/index.js"; }
319
- declare module "node:stream" { export { stream } from "@tsonic/nodejs/index.js"; }
320
- declare module "stream" { export { stream } from "@tsonic/nodejs/index.js"; }
321
- declare module "node:timers" { export { timers } from "@tsonic/nodejs/index.js"; }
322
- declare module "timers" { export { timers } from "@tsonic/nodejs/index.js"; }
323
- declare module "node:tls" { export { tls } from "@tsonic/nodejs/index.js"; }
324
- declare module "tls" { export { tls } from "@tsonic/nodejs/index.js"; }
325
- declare module "node:url" { export { url } from "@tsonic/nodejs/index.js"; }
326
- declare module "url" { export { url } from "@tsonic/nodejs/index.js"; }
327
- declare module "node:util" { export { util } from "@tsonic/nodejs/index.js"; }
328
- declare module "util" { export { util } from "@tsonic/nodejs/index.js"; }
329
- declare module "node:zlib" { export { zlib } from "@tsonic/nodejs/index.js"; }
330
- declare module "zlib" { export { zlib } from "@tsonic/nodejs/index.js"; }
331
- `;
332
- //# sourceMappingURL=js-surface-shims.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js-surface-shims.js","sourceRoot":"","sources":["../../src/surface/js-surface-shims.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgSvC,CAAC;AAEF,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC3C,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=js-surface-shims.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js-surface-shims.test.d.ts","sourceRoot":"","sources":["../../src/surface/js-surface-shims.test.ts"],"names":[],"mappings":""}
@@ -1,53 +0,0 @@
1
- import { describe, it } from "mocha";
2
- import { expect } from "chai";
3
- import { JS_SURFACE_GLOBALS_SHIMS, JS_SURFACE_NODE_MODULE_SHIMS, } from "./js-surface-shims.js";
4
- describe("JS Surface Shims", () => {
5
- it("declares required JS runtime globals", () => {
6
- const requiredGlobals = [
7
- "interface String",
8
- "interface Array<T>",
9
- "interface ReadonlyArray<T>",
10
- "const console: Console;",
11
- "const Date: DateConstructor;",
12
- "const JSON: JSON;",
13
- "const Math: Math;",
14
- "const RegExp: RegExpConstructor;",
15
- "const Map: MapConstructor;",
16
- "const Set: SetConstructor;",
17
- "function parseInt(",
18
- "function parseFloat(",
19
- "function isFinite(",
20
- "function isNaN(",
21
- "function setTimeout(",
22
- "function setInterval(",
23
- ];
24
- for (const token of requiredGlobals) {
25
- expect(JS_SURFACE_GLOBALS_SHIMS).to.include(token);
26
- }
27
- });
28
- it("keeps unsupported mutating Array APIs out of compiler-owned shims", () => {
29
- expect(JS_SURFACE_GLOBALS_SHIMS).to.not.include("push(");
30
- expect(JS_SURFACE_GLOBALS_SHIMS).to.not.include("pop(");
31
- expect(JS_SURFACE_GLOBALS_SHIMS).to.not.include("splice(");
32
- expect(JS_SURFACE_GLOBALS_SHIMS).to.not.include("shift(");
33
- expect(JS_SURFACE_GLOBALS_SHIMS).to.not.include("unshift(");
34
- });
35
- it("declares node alias modules for both node:* and bare specifiers", () => {
36
- const requiredNodeAliases = [
37
- 'declare module "node:fs" { export { fs } from "@tsonic/nodejs/index.js"; }',
38
- 'declare module "fs" { export { fs } from "@tsonic/nodejs/index.js"; }',
39
- 'declare module "node:path" { export { path } from "@tsonic/nodejs/index.js"; }',
40
- 'declare module "path" { export { path } from "@tsonic/nodejs/index.js"; }',
41
- 'declare module "node:crypto" { export { crypto } from "@tsonic/nodejs/index.js"; }',
42
- 'declare module "crypto" { export { crypto } from "@tsonic/nodejs/index.js"; }',
43
- 'declare module "node:process" { export { process } from "@tsonic/nodejs/index.js"; }',
44
- 'declare module "process" { export { process } from "@tsonic/nodejs/index.js"; }',
45
- 'declare module "node:os" { export { os } from "@tsonic/nodejs/index.js"; }',
46
- 'declare module "os" { export { os } from "@tsonic/nodejs/index.js"; }',
47
- ];
48
- for (const alias of requiredNodeAliases) {
49
- expect(JS_SURFACE_NODE_MODULE_SHIMS).to.include(alias);
50
- }
51
- });
52
- });
53
- //# sourceMappingURL=js-surface-shims.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"js-surface-shims.test.js","sourceRoot":"","sources":["../../src/surface/js-surface-shims.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,GAC7B,MAAM,uBAAuB,CAAC;AAE/B,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC9C,MAAM,eAAe,GAAG;YACtB,kBAAkB;YAClB,oBAAoB;YACpB,4BAA4B;YAC5B,yBAAyB;YACzB,8BAA8B;YAC9B,mBAAmB;YACnB,mBAAmB;YACnB,kCAAkC;YAClC,4BAA4B;YAC5B,4BAA4B;YAC5B,oBAAoB;YACpB,sBAAsB;YACtB,oBAAoB;YACpB,iBAAiB;YACjB,sBAAsB;YACtB,uBAAuB;SACf,CAAC;QAEX,KAAK,MAAM,KAAK,IAAI,eAAe,EAAE,CAAC;YACpC,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACrD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;QAC3E,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACzD,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACxD,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC3D,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC1D,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACzE,MAAM,mBAAmB,GAAG;YAC1B,4EAA4E;YAC5E,uEAAuE;YACvE,gFAAgF;YAChF,2EAA2E;YAC3E,oFAAoF;YACpF,+EAA+E;YAC/E,sFAAsF;YACtF,iFAAiF;YACjF,4EAA4E;YAC5E,uEAAuE;SAC/D,CAAC;QAEX,KAAK,MAAM,KAAK,IAAI,mBAAmB,EAAE,CAAC;YACxC,MAAM,CAAC,4BAA4B,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,40 +0,0 @@
1
- /**
2
- * Centralized list of unsupported TypeScript utility types
3
- *
4
- * These utility types internally use mapped or conditional types which are not
5
- * supported in Tsonic. They are detected by name in TypeReferenceNode validation.
6
- *
7
- * Note: This only applies to the built-in utility types from TypeScript's lib.
8
- * User-defined types with these names (without type arguments) are allowed.
9
- */
10
- /**
11
- * Mapped-type utility types (TSN7406)
12
- *
13
- * SUPPORTED (expanded at compile time for concrete types):
14
- * - Partial<T> → { [P in keyof T]?: T[P] }
15
- * - Required<T> → { [P in keyof T]-?: T[P] }
16
- * - Readonly<T> → { readonly [P in keyof T]: T[P] }
17
- * - Pick<T, K> → { [P in K]: T[P] }
18
- * - Omit<T, K> → { [P in Exclude<keyof T, K>]: T[P] }
19
- *
20
- * Note: Record<K, V> is handled separately (allowed when K is string, TSN7413 otherwise)
21
- * Note: ReadonlyArray<T> is NOT a mapped type - it maps to IReadOnlyList<T> and is supported
22
- */
23
- export declare const UNSUPPORTED_MAPPED_UTILITY_TYPES: Set<string>;
24
- /**
25
- * Conditional-type utility types (TSN7407)
26
- *
27
- * SUPPORTED (expanded at compile time for concrete types):
28
- * - Extract<T, U> → T extends U ? T : never
29
- * - Exclude<T, U> → T extends U ? never : T
30
- * - NonNullable<T> → T & {} (filters null/undefined from unions)
31
- * - ReturnType<T> → T extends (...args: any) => infer R ? R : any
32
- * - Parameters<T> → T extends (...args: infer P) => any ? P : never
33
- * - Awaited<T> → T extends PromiseLike<infer U> ? Awaited<U> : T
34
- *
35
- * SUPPORTED (expanded at compile time for concrete constructor shapes):
36
- * - ConstructorParameters<T>
37
- * - InstanceType<T>
38
- */
39
- export declare const UNSUPPORTED_CONDITIONAL_UTILITY_TYPES: Set<string>;
40
- //# sourceMappingURL=unsupported-utility-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unsupported-utility-types.d.ts","sourceRoot":"","sources":["../../src/validation/unsupported-utility-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC,aAG3C,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qCAAqC,aAAsB,CAAC"}
@@ -1,43 +0,0 @@
1
- /**
2
- * Centralized list of unsupported TypeScript utility types
3
- *
4
- * These utility types internally use mapped or conditional types which are not
5
- * supported in Tsonic. They are detected by name in TypeReferenceNode validation.
6
- *
7
- * Note: This only applies to the built-in utility types from TypeScript's lib.
8
- * User-defined types with these names (without type arguments) are allowed.
9
- */
10
- /**
11
- * Mapped-type utility types (TSN7406)
12
- *
13
- * SUPPORTED (expanded at compile time for concrete types):
14
- * - Partial<T> → { [P in keyof T]?: T[P] }
15
- * - Required<T> → { [P in keyof T]-?: T[P] }
16
- * - Readonly<T> → { readonly [P in keyof T]: T[P] }
17
- * - Pick<T, K> → { [P in K]: T[P] }
18
- * - Omit<T, K> → { [P in Exclude<keyof T, K>]: T[P] }
19
- *
20
- * Note: Record<K, V> is handled separately (allowed when K is string, TSN7413 otherwise)
21
- * Note: ReadonlyArray<T> is NOT a mapped type - it maps to IReadOnlyList<T> and is supported
22
- */
23
- export const UNSUPPORTED_MAPPED_UTILITY_TYPES = new Set([
24
- // Partial, Required, Readonly, Pick, Omit are now supported
25
- // They are expanded to IrObjectType in type-converter/utility-types.ts
26
- ]);
27
- /**
28
- * Conditional-type utility types (TSN7407)
29
- *
30
- * SUPPORTED (expanded at compile time for concrete types):
31
- * - Extract<T, U> → T extends U ? T : never
32
- * - Exclude<T, U> → T extends U ? never : T
33
- * - NonNullable<T> → T & {} (filters null/undefined from unions)
34
- * - ReturnType<T> → T extends (...args: any) => infer R ? R : any
35
- * - Parameters<T> → T extends (...args: infer P) => any ? P : never
36
- * - Awaited<T> → T extends PromiseLike<infer U> ? Awaited<U> : T
37
- *
38
- * SUPPORTED (expanded at compile time for concrete constructor shapes):
39
- * - ConstructorParameters<T>
40
- * - InstanceType<T>
41
- */
42
- export const UNSUPPORTED_CONDITIONAL_UTILITY_TYPES = new Set([]);
43
- //# sourceMappingURL=unsupported-utility-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unsupported-utility-types.js","sourceRoot":"","sources":["../../src/validation/unsupported-utility-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,IAAI,GAAG,CAAS;AAC9D,4DAA4D;AAC5D,uEAAuE;CACxE,CAAC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,IAAI,GAAG,CAAS,EAAE,CAAC,CAAC"}