-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathIterator.cs
More file actions
58 lines (53 loc) · 1.41 KB
/
Iterator.cs
File metadata and controls
58 lines (53 loc) · 1.41 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
//TODO! Disable missing XML comments.
#pragma warning disable CS1591
using CSharpToJavaScript.Utils;
using System;
namespace CSharpToJavaScript.APIs.JS.Ecma;
//Todo? interfaces?
//https://262.ecma-international.org/14.0/#sec-common-iteration-interfaces
[To(ToAttribute.Default)]
public partial class Iterator : ObjectPrototype
{
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Next()
{
throw new System.NotImplementedException();
}
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Return(dynamic value)
{
throw new System.NotImplementedException();
}
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Throw(dynamic exception)
{
throw new System.NotImplementedException();
}
}
[To(ToAttribute.Default)]
public partial class AsyncIterator : ObjectPrototype
{
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Next()
{
throw new System.NotImplementedException();
}
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Return(dynamic value)
{
throw new System.NotImplementedException();
}
[To(ToAttribute.FirstCharToLowerCase)]
public IteratorResult Throw(dynamic exception)
{
throw new System.NotImplementedException();
}
}
[To(ToAttribute.None)]
public class IteratorResult
{
[To(ToAttribute.FirstCharToLowerCase)]
public bool Done { get; set; } = true;
[To(ToAttribute.FirstCharToLowerCase)]
public dynamic? Value { get; set; } = null;
}