diff --git a/implementations/javascript/src/record.ts b/implementations/javascript/src/record.ts index fc5a350..825b9ce 100644 --- a/implementations/javascript/src/record.ts +++ b/implementations/javascript/src/record.ts @@ -77,7 +77,7 @@ export class Record extends Array> { static makeBasicConstructor(label: Value, fieldNames: string[]): RecordConstructor { const arity = fieldNames.length; - const ctor: RecordConstructor = (...fields: any[]): Record => { + const ctor: RecordConstructor = (...fields: Value[]): Record => { if (fields.length !== arity) { throw new Error("Record: cannot instantiate " + (label && label.toString()) + " expecting " + arity + " fields with " + fields.length + " fields"); @@ -89,7 +89,7 @@ export class Record extends Array> { ctor.isClassOf = (v: any): v is Record => Record.isClassOf(constructorInfo, v); ctor._ = {}; fieldNames.forEach((name, i) => { - ctor._[name] = function (r: any): Value | undefined { + ctor._[name] = function (r: Value): Value | undefined { if (!ctor.isClassOf(r)) { throw new Error("Record: attempt to retrieve field "+label.toString()+"."+name+ " from non-"+label.toString()+": "+(r && r.toString())); @@ -121,10 +121,10 @@ export class Record extends Array> { } export interface RecordConstructor { - (...fields: any[]): Record; + (...fields: Value[]): Record; constructorInfo: RecordConstructorInfo; isClassOf(v: any): v is Record; - _: { [getter: string]: (r: any) => Value | undefined }; + _: { [getter: string]: (r: Value) => Value | undefined }; } export interface RecordConstructorInfo {