diff --git a/implementations/javascript/src/record.ts b/implementations/javascript/src/record.ts index 825b9ce..72c0aa5 100644 --- a/implementations/javascript/src/record.ts +++ b/implementations/javascript/src/record.ts @@ -71,11 +71,11 @@ export class Record extends Array> { }).join(', ') + ')'; } - static makeConstructor(labelSymbolText: string, fieldNames: string[]): RecordConstructor { + static makeConstructor(labelSymbolText: string, fieldNames: string[]): RecordConstructor { return Record.makeBasicConstructor(Symbol.for(labelSymbolText), fieldNames); } - static makeBasicConstructor(label: Value, fieldNames: string[]): RecordConstructor { + static makeBasicConstructor(label: Value, fieldNames: string[]): RecordConstructor { const arity = fieldNames.length; const ctor: RecordConstructor = (...fields: Value[]): Record => { if (fields.length !== arity) {