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