-
Notifications
You must be signed in to change notification settings - Fork 1
SupportedFeatures
Edgar Mesquita edited this page Feb 10, 2026
·
36 revisions
This document provides a comprehensive list of C# features, .NET APIs, and patterns supported by the eQuantic.UI compiler.
Legend
✅ Full Support: Transpiles to equivalent JavaScript behavior.
⚠️ Partial Support: Works with caveats or minor differences.🚧 Planned: On the roadmap.
❌ Not Supported: fundamentally incompatible logic (e.g., blocking I/O, unsafe pointers).
| Feature | Status | Notes |
|---|---|---|
| Classes & Structs | ✅ | Transpiled to ES6 Classes. |
| Interfaces | ✅ | Used for TypeScript type checking (erased at runtime). |
| Enums | ✅ | Transpiled to JS Objects (bidirectional mapping). |
| Generics | ✅ | Fully supported (erased at runtime). |
| Extension Methods | ✅ | Resolved via Semantic Model and transpiled to direct calls. |
| Async / Await | ✅ | Maps to async / await and Promise. |
| Lambda Expressions | ✅ | Maps to Arrow Functions () => {}. |
| Pattern Matching | ✅ |
is patterns, Property Patterns, Recursive Patterns. |
| String Interpolation | ✅ | Maps to Template Literals `${var}`. |
| Null-Coalescing | ✅ |
?? and ??= mapped to JS equivalents. |
| Object Initializers | ✅ |
new Obj { Prop = 1 }. |
| Collection Initializers | ✅ |
new List<int> { 1, 2 } maps to [1, 2]. |
| Deconstruction | ✅ |
var (a, b) = tuple maps to [a, b] = tuple. |
| Local Functions | ✅ | Transpiled to inner functions. |
Records (with) |
✅ | Maps to object spread { ...src, prop: val }. |
typeof |
✅ | Maps to type name string literal. |
base calls |
✅ | Maps to super keyword. |
cast & as |
✅ | Maps to JS passthrough/truncation. |
sizeof |
✅ | Maps to C# primitive sizes. |
| Anonymous Methods | ✅ |
delegate(...) { ... } maps to arrow functions. |
stackalloc |
✅ | Maps to Typed Arrays (e.g., Int32Array). |
yield return |
✅ | Maps to JS Generator Functions (function*). |
lock |
Transpiled to a no-op block (JS is single-threaded). |
The compiler includes specialized strategies for nearly all LINQ methods.
| Logic | Methods | Status |
|---|---|---|
| Filtering |
Where, OfType
|
✅ |
| Projection |
Select, SelectMany, Cast
|
✅ |
| Partitioning |
Skip, Take, SkipWhile, TakeWhile
|
✅ |
| Ordering |
OrderBy, OrderByDescending, ThenBy, Reverse
|
✅ |
| Aggregation |
Count, Sum, Min, Max, Average, Aggregate
|
✅ |
| Quantifiers |
Any, All, Contains
|
✅ |
| Sets |
Distinct, DistinctBy, Union, Intersect, Except, Concat
|
✅ |
| Elements |
First, FirstOrDefault, Single, Last, ElementAt
|
✅ |
| Utility |
SequenceEqual, DefaultIfEmpty
|
✅ |
| Conversion |
ToList, ToArray, ToDictionary, ToHashSet
|
✅ |
| Grouping/Join |
GroupBy, Join, Zip
|
✅ |
We map common .NET types to their JavaScript equivalents.
| .NET Type | JavaScript Equivalent |
|---|---|
string |
String |
int, double, float
|
Number |
bool |
Boolean |
object |
Object |
dynamic |
any |
- ✅
Join,Format - ✅
IsNullOrEmpty,IsNullOrWhiteSpace - ✅
Split,Replace,Substring,Trim - ✅
ToLower,ToUpper,StartsWith,EndsWith
- ✅
DateTime.Now,DateTime.UtcNowmapped tonew Date(). - ✅
Year,Month,Day,Hour... properties. - ✅
AddDays,AddHours... methods. - ✅
ToString()(basic formatting). - ✅
TimeSpan.FromMilliseconds... mapped to numeric milliseconds.
- ✅
List<T>→ Javascript Array[] - ✅
Dictionary<TKey, TValue>→ Javascript Object{}orMap(depending on usage). - ✅
HashSet<T>→ JavascriptSet. - ✅
Queue<T>,Stack<T>→ Javascript Array methods (push/shift/pop).
- ✅
Task,Task<T>→Promise. - ✅
Task.Delay→setTimeoutwrapper. - ✅
Task.WhenAll,Task.WhenAny. ⚠️ Task.Runexecutes on the main thread (microtask), NOT a background thread.
- ✅
Console.WriteLine→console.log. - ✅
Math.*(Min, Max, Abs, Round, etc.) →Math.*. - ✅
Guid(NewGuid,Empty,Parse) →crypto.randomUUID(). - ✅
Regex→ JavaScriptRegExp.
eQuantic.UI.Lucide / Heroicons / RadixIcons / TablerIcons / Phosphor / SimpleIcons / BootstrapIcons / Iconoir / ...
Purpose: Comprehensive Icon Sets. Contains:
- SVG resolution logic
- Specialized icon components
-
IIconProviderimplementation
| Package | Purpose | Status |
|---|---|---|
| eQuantic.UI.Charts (Apex/ChartJS) | High-performance visualization. | ✅ |
| eQuantic.UI.Lottie | High-performance animations. | ✅ |
| eQuantic.UI.Image | Optimized (Lazy/Blur/Priority). | ✅ |
| eQuantic.UI.Tailwind | Standard styling integration. | ✅ |
| Pattern | Interface | Description | Status |
|---|---|---|---|
| Metadata Management | IHandleMetadata |
SEO tags and head elements. | ✅ |
| Asset Management | IRequireAssets |
Dynamic script/style injection. | ✅ |
| Server Actions | [ServerAction] |
Secure RPC from Client to Server. | ✅ |
| Compound Components | N/A | Semantic sub-component patterns. | ✅ |
-
Blocking Code:
- ❌
.Wait(),.Resulton Tasks are NOT supported. You must useawait. Blocking the main thread freezes the browser UI.
- ❌
-
Reflection:
- ❌
System.Reflectionis largely unsupported. - ✅
typeof(T).Nameandnameof(...)are supported constants.
- ❌
-
File System:
- ❌
System.IO(File,Directory) is not strictly forbidden but will fail at runtime in the browser. - Use Server Actions to handle file operations.
- ❌
-
Numbers:
⚠️ JavaScript uses 64-bit floating point for all numbers.long(64-bit int) precision may be lost for values > 2^53.-
decimalis treated asnumber(double), so currency precision logic should happen on the Server.
-
Thread Safety:
- Since JS is single-threaded,
lockstatements are compiled away (ignored). -
Thread.Sleepis not supported (useTask.Delay).
- Since JS is single-threaded,