|
| 1 | +//TODO! Disable missing XML comments. |
| 2 | +#pragma warning disable CS1591 |
| 3 | + |
| 4 | +using CSharpToJavaScript.Utils; |
| 5 | +using System; |
| 6 | + |
| 7 | +namespace CSharpToJavaScript.APIs.JS.Ecma; |
| 8 | + |
| 9 | +//https://262.ecma-international.org/14.0/#sec-promise-objects |
| 10 | +[To(ToAttribute.Default)] |
| 11 | +public partial class Promise : PromisePrototype |
| 12 | +{ |
| 13 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 14 | + public static PromisePrototype Prototype { get; } = new(); |
| 15 | + public Promise(Action executor) { } |
| 16 | + |
| 17 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 18 | + public static Promise All(Array iterable) |
| 19 | + { |
| 20 | + throw new System.NotImplementedException(); |
| 21 | + } |
| 22 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 23 | + public static Promise AllSettled(Array iterable) |
| 24 | + { |
| 25 | + throw new System.NotImplementedException(); |
| 26 | + } |
| 27 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 28 | + public static Promise Any(Array iterable) |
| 29 | + { |
| 30 | + throw new System.NotImplementedException(); |
| 31 | + } |
| 32 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 33 | + public static Promise Race(Array iterable) |
| 34 | + { |
| 35 | + throw new System.NotImplementedException(); |
| 36 | + } |
| 37 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 38 | + public static Promise Reject(dynamic r) |
| 39 | + { |
| 40 | + throw new System.NotImplementedException(); |
| 41 | + } |
| 42 | + [To(ToAttribute.FirstCharToLowerCase)] |
| 43 | + public static Promise Resolve(dynamic x) |
| 44 | + { |
| 45 | + throw new System.NotImplementedException(); |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +[To(ToAttribute.FirstCharToLowerCase)] |
| 50 | +public class PromisePrototype : FunctionPrototype |
| 51 | +{ |
| 52 | + public PromisePrototype() { } |
| 53 | + |
| 54 | + public Promise Catch(Action onRejected) |
| 55 | + { |
| 56 | + throw new System.NotImplementedException(); |
| 57 | + } |
| 58 | + public Promise Finally (Action onFinally) |
| 59 | + { |
| 60 | + throw new System.NotImplementedException(); |
| 61 | + } |
| 62 | + public Promise Then(Action onFulfilled, Action? onRejected = null) |
| 63 | + { |
| 64 | + throw new System.NotImplementedException(); |
| 65 | + } |
| 66 | +} |
0 commit comments