@@ -112,7 +112,7 @@ export function unionToJson(self: any) {
112112}
113113
114114export function unionGetHashCode ( self : any ) : number {
115- if ( isHashable ( self ) && ! ( self instanceof Union ) ) {
115+ if ( isHashable ( self ) ) { // && !(self instanceof Union)) {
116116 return self . GetHashCode ( ) ;
117117 } else {
118118 const hashes = self . fields . map ( ( x : any ) => structuralHash ( x ) ) ;
@@ -124,7 +124,7 @@ export function unionGetHashCode(self: any): number {
124124export function unionEquals ( self : any , other : any ) {
125125 if ( self === other ) {
126126 return true ;
127- } else if ( isEquatable ( self ) && ! ( self instanceof Union ) ) {
127+ } else if ( isEquatable ( self ) ) { // && !(self instanceof Union)) {
128128 return self . Equals ( other ) ;
129129 } else if ( ! isSameType ( self , other ) ) {
130130 return false ;
@@ -138,7 +138,7 @@ export function unionEquals(self: any, other: any) {
138138export function unionCompareTo ( self : any , other : any ) {
139139 if ( self === other ) {
140140 return 0 ;
141- } else if ( isComparable ( self ) && ! ( self instanceof Union ) ) {
141+ } else if ( isComparable ( self ) ) { // && !(self instanceof Union)) {
142142 return self . CompareTo ( other ) ;
143143 } else if ( ! isSameType ( self , other ) ) {
144144 return - 1 ;
@@ -149,43 +149,43 @@ export function unionCompareTo(self: any, other: any) {
149149 }
150150}
151151
152- export class Union implements IEquatable < any > , IComparable < any > {
153- public tag : number ;
154- public fields : any [ ] ;
152+ // export class Union implements IEquatable<any>, IComparable<any> {
153+ // public tag: number;
154+ // public fields: any[];
155155
156- public cases ( ) : string [ ] {
157- return [ ] ;
158- }
156+ // public cases(): string[] {
157+ // return [];
158+ // }
159159
160- constructor ( tag : number , ...fields : any [ ] ) {
161- this . tag = tag | 0 ;
162- this . fields = fields ;
163- }
160+ // constructor(tag: number, ...fields: any[]) {
161+ // this.tag = tag | 0;
162+ // this.fields = fields;
163+ // }
164164
165- public toJSON ( ) {
166- return unionToJson ( this ) ;
167- }
165+ // public toJSON() {
166+ // return unionToJson(this);
167+ // }
168168
169- public toString ( ) {
170- return this . ToString ( ) ;
171- }
169+ // public toString() {
170+ // return this.ToString();
171+ // }
172172
173- public ToString ( ) {
174- return unionToString ( this ) ;
175- }
173+ // public ToString() {
174+ // return unionToString(this);
175+ // }
176176
177- public GetHashCode ( ) {
178- return unionGetHashCode ( this ) ;
179- }
177+ // public GetHashCode() {
178+ // return unionGetHashCode(this);
179+ // }
180180
181- public Equals ( other : any ) {
182- return unionEquals ( this , other ) ;
183- }
181+ // public Equals(other: any) {
182+ // return unionEquals(this, other);
183+ // }
184184
185- public CompareTo ( other : any ) {
186- return unionCompareTo ( this , other ) ;
187- }
188- }
185+ // public CompareTo(other: any) {
186+ // return unionCompareTo(this, other);
187+ // }
188+ // }
189189
190190export function recordToString ( self : any ) {
191191 if ( isStringable ( self ) ) {
@@ -205,7 +205,7 @@ export function recordToJson(self: any, getFieldNames?: (arg: any) => any) {
205205}
206206
207207export function recordGetHashCode ( self : any ) {
208- if ( isHashable ( self ) && ! ( self instanceof Record ) ) {
208+ if ( isHashable ( self ) ) { // && !(self instanceof Record)) {
209209 return self . GetHashCode ( ) ;
210210 } else {
211211 const hashes = Object . values ( self ) . map ( ( v ) => structuralHash ( v ) ) ;
@@ -216,7 +216,7 @@ export function recordGetHashCode(self: any) {
216216export function recordEquals ( self : any , other : any ) {
217217 if ( self === other ) {
218218 return true ;
219- } else if ( isEquatable ( self ) && ! ( self instanceof Record ) ) {
219+ } else if ( isEquatable ( self ) ) { // && !(self instanceof Record)) {
220220 return self . Equals ( other ) ;
221221 } else if ( ! isSameType ( self , other ) ) {
222222 return false ;
@@ -234,7 +234,7 @@ export function recordEquals(self: any, other: any) {
234234export function recordCompareTo ( self : any , other : any ) {
235235 if ( self === other ) {
236236 return 0 ;
237- } else if ( isComparable ( self ) && ! ( self instanceof Record ) ) {
237+ } else if ( isComparable ( self ) ) { // && !(self instanceof Record)) {
238238 return self . CompareTo ( other ) ;
239239 } else if ( ! isSameType ( self , other ) ) {
240240 return - 1 ;
@@ -250,42 +250,41 @@ export function recordCompareTo(self: any, other: any) {
250250 }
251251}
252252
253- export class Record implements IEquatable < any > , IComparable < any > {
253+ // export class Record implements IEquatable<any>, IComparable<any> {
254254
255- public toJSON ( ) {
256- return recordToJson ( this ) ;
257- }
255+ // public toJSON() {
256+ // return recordToJson(this);
257+ // }
258258
259- public toString ( ) {
260- return this . ToString ( ) ;
261- }
259+ // public toString() {
260+ // return this.ToString();
261+ // }
262262
263- public ToString ( ) {
264- return recordToString ( this ) ;
265- }
263+ // public ToString() {
264+ // return recordToString(this);
265+ // }
266266
267- public GetHashCode ( ) {
268- return recordGetHashCode ( this ) ;
269- }
267+ // public GetHashCode() {
268+ // return recordGetHashCode(this);
269+ // }
270270
271- public Equals ( other : any ) {
272- return recordEquals ( this , other ) ;
273- }
271+ // public Equals(other: any) {
272+ // return recordEquals(this, other);
273+ // }
274274
275- public CompareTo ( other : any ) {
276- return recordCompareTo ( this , other ) ;
277- }
278- }
275+ // public CompareTo(other: any) {
276+ // return recordCompareTo(this, other);
277+ // }
278+ // }
279279
280280export function anonRecord ( o : any ) {
281- return Object . assign ( Object . create ( Record . prototype ) , o ) ;
281+ // return Object.assign(Object.create(Record.prototype), o);
282+ return o ;
282283}
283284
284- export class FSharpRef < T > extends Record {
285+ export class FSharpRef < T > {
285286 public contents : T ;
286-
287287 constructor ( contents : T | null ) {
288- super ( ) ;
289288 this . contents = contents as T ;
290289 }
291290}
@@ -392,5 +391,5 @@ export class MatchFailureException extends FSharpException {
392391 }
393392}
394393
395- export class Attribute extends SystemObject {
394+ export class Attribute {
396395}
0 commit comments