Skip to content

Commit 938efbc

Browse files
committed
Added Array.
More pragma ignore.
1 parent 97262f3 commit 938efbc

File tree

14 files changed

+253
-21
lines changed

14 files changed

+253
-21
lines changed
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
5+
using System;
6+
using System.Collections;
7+
using System.Collections.Generic;
8+
using System.Reflection;
9+
10+
namespace CSharpToJavaScript.APIs.JS;
11+
12+
//https://262.ecma-international.org/14.0/#sec-array-objects
13+
[To(ToAttribute.Default)]
14+
public partial class Array : ArrayPrototype
15+
{
16+
[To(ToAttribute.FirstCharToLowerCase)]
17+
public static ArrayPrototype Prototype { get; } = new();
18+
19+
[To(ToAttribute.FirstCharToLowerCase)]
20+
public int Length { get; } = 0;
21+
public Array(params dynamic[] values)
22+
{
23+
throw new System.NotImplementedException();
24+
}
25+
//Todo! Function for mapfn?
26+
[To(ToAttribute.FirstCharToLowerCase)]
27+
public static Array From(dynamic items, Action<dynamic>? mapfn = null, dynamic? thisArg = null)
28+
{
29+
throw new System.NotImplementedException();
30+
}
31+
[To(ToAttribute.FirstCharToLowerCase)]
32+
public static bool IsArray(dynamic arg)
33+
{
34+
throw new System.NotImplementedException();
35+
}
36+
[To(ToAttribute.FirstCharToLowerCase)]
37+
public static Array Of(params dynamic[] items)
38+
{
39+
throw new System.NotImplementedException();
40+
}
41+
}
42+
43+
[To(ToAttribute.FirstCharToLowerCase)]
44+
public partial class ArrayPrototype : FunctionPrototype
45+
{
46+
public ArrayPrototype() { }
47+
public dynamic? At(int index)
48+
{
49+
throw new System.NotImplementedException();
50+
}
51+
public Array CopyWithin(dynamic target, int start,int end = 0)
52+
{
53+
throw new System.NotImplementedException();
54+
}
55+
public List<dynamic> Entries()
56+
{
57+
throw new System.NotImplementedException();
58+
}
59+
public bool Every(Action callbackfn, dynamic? thisArg = null )
60+
{
61+
throw new System.NotImplementedException();
62+
}
63+
public Array Fill(dynamic value, int start = 0, int end = 0 )
64+
{
65+
throw new System.NotImplementedException();
66+
}
67+
public Array Filter(Action callbackfn, dynamic? thisArg = null)
68+
{
69+
throw new System.NotImplementedException();
70+
}
71+
public dynamic? Find(Action predicate, dynamic? thisArg = null)
72+
{
73+
throw new System.NotImplementedException();
74+
}
75+
public int FindIndex(Action predicate, dynamic? thisArg = null)
76+
{
77+
throw new System.NotImplementedException();
78+
}
79+
public dynamic? FindLast(Action predicate, dynamic? thisArg = null)
80+
{
81+
throw new System.NotImplementedException();
82+
}
83+
public int FindLastIndex(Action predicate, dynamic? thisArg = null)
84+
{
85+
throw new System.NotImplementedException();
86+
}
87+
public Array Flat(int depth = 1 )
88+
{
89+
throw new System.NotImplementedException();
90+
}
91+
public Array FlatMap(Action mapperFunction, dynamic? thisArg = null)
92+
{
93+
throw new System.NotImplementedException();
94+
}
95+
public GlobalObject.Undefined ForEach(Action callbackfn, dynamic? thisArg = null)
96+
{
97+
throw new System.NotImplementedException();
98+
}
99+
public bool Includes(dynamic searchElement, int fromIndex = 0)
100+
{
101+
throw new System.NotImplementedException();
102+
}
103+
public int IndexOf(dynamic searchElement, int fromIndex = 0)
104+
{
105+
throw new System.NotImplementedException();
106+
}
107+
public string Join(string separator = ",")
108+
{
109+
throw new System.NotImplementedException();
110+
}
111+
public List<dynamic> Keys()
112+
{
113+
throw new System.NotImplementedException();
114+
}
115+
public int LastIndexOf(dynamic searchElement, int fromIndex = 0)
116+
{
117+
throw new System.NotImplementedException();
118+
}
119+
public Array Map(Action callbackfn,dynamic? thisArg = null )
120+
{
121+
throw new System.NotImplementedException();
122+
}
123+
public dynamic Pop()
124+
{
125+
throw new System.NotImplementedException();
126+
}
127+
public int Push(params dynamic[] tems )
128+
{
129+
throw new System.NotImplementedException();
130+
}
131+
public dynamic Reduce(Action callbackfn, dynamic? initialValue = null)
132+
{
133+
throw new System.NotImplementedException();
134+
}
135+
public dynamic ReduceRight(Action callbackfn, dynamic? initialValue = null)
136+
{
137+
throw new System.NotImplementedException();
138+
}
139+
public Array Reverse()
140+
{
141+
throw new System.NotImplementedException();
142+
}
143+
public dynamic? Shift()
144+
{
145+
throw new System.NotImplementedException();
146+
}
147+
public Array Slice(int start = 0, int end = 0 )
148+
{
149+
throw new System.NotImplementedException();
150+
}
151+
public bool Some(Action callbackfn, dynamic? thisArg = null )
152+
{
153+
throw new System.NotImplementedException();
154+
}
155+
public Array Sort(Action comparefn )
156+
{
157+
throw new System.NotImplementedException();
158+
}
159+
public Array Splice(int start, int deleteCount, params dynamic[] items )
160+
{
161+
throw new System.NotImplementedException();
162+
}
163+
public string ToLocaleString(dynamic? reserved1 = null, dynamic? reserved2 = null)
164+
{
165+
throw new System.NotImplementedException();
166+
}
167+
public Array ToReversed()
168+
{
169+
throw new System.NotImplementedException();
170+
}
171+
public Array ToSorted(Action comparefn )
172+
{
173+
throw new System.NotImplementedException();
174+
}
175+
public Array ToSpliced(int start, int skipCount,params dynamic[] items )
176+
{
177+
throw new System.NotImplementedException();
178+
}
179+
public string ToString()
180+
{
181+
throw new System.NotImplementedException();
182+
}
183+
public int Unshift(params dynamic[] items )
184+
{
185+
throw new System.NotImplementedException();
186+
}
187+
public List<dynamic> Values()
188+
{
189+
throw new System.NotImplementedException();
190+
}
191+
public Array With(int index, dynamic value )
192+
{
193+
throw new System.NotImplementedException();
194+
195+
}
196+
}

CSharpToJavaScript/APIs/JS/Ecma/BigInt.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25

36
namespace CSharpToJavaScript.APIs.JS;
47

CSharpToJavaScript/APIs/JS/Ecma/Boolean.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25
using System;
36
using System.Collections.Generic;
47
using System.Linq;

CSharpToJavaScript/APIs/JS/Ecma/Date.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25

36
namespace CSharpToJavaScript.APIs.JS
47
{

CSharpToJavaScript/APIs/JS/Ecma/Error.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25
using System;
36

47
namespace CSharpToJavaScript.APIs.JS;

CSharpToJavaScript/APIs/JS/Ecma/Function.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25
using System;
36
using System.Collections.Generic;
47
using System.Linq;

CSharpToJavaScript/APIs/JS/Ecma/GlobalObject.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25

36
namespace CSharpToJavaScript.APIs.JS
47
{
@@ -33,13 +36,13 @@ public static AggregateError AggregateError(object[] errors, string? message = n
3336
throw new System.NotImplementedException();
3437
}
3538

36-
/*
39+
3740
[To(ToAttribute.Default)]
3841
public static Array Array(params dynamic[] values)
3942
{
4043
throw new System.NotImplementedException();
4144
}
42-
*/
45+
4346

4447
[To(ToAttribute.Default)]
4548
public static BigInt BigInt(dynamic value)
@@ -125,13 +128,13 @@ public static string String(dynamic value)
125128

126129
}
127130

128-
/*
131+
129132
[To(ToAttribute.Default)]
130133
public static Symbol Symbol(dynamic? description = null)
131134
{
132135
throw new System.NotImplementedException();
133136

134-
}*/
137+
}
135138

136139
[To(ToAttribute.Default)]
137140
public static SyntaxError SyntaxError(string message, object? options = null)

CSharpToJavaScript/APIs/JS/Ecma/Math.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25

36

47
namespace CSharpToJavaScript.APIs.JS

CSharpToJavaScript/APIs/JS/Ecma/Number.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25

36
namespace CSharpToJavaScript.APIs.JS
47
{

CSharpToJavaScript/APIs/JS/Ecma/Object.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
using CSharpToJavaScript.Utils;
1+
//Disable missing XML comments.
2+
#pragma warning disable CS1591
3+
4+
using CSharpToJavaScript.Utils;
25
using System.Collections.Generic;
36

47
namespace CSharpToJavaScript.APIs.JS

0 commit comments

Comments
 (0)