Hey everyone! What type the Entry should be here to use the .len()?
Error: Type error, field len does not exist in type [Entry]
My code:
import Types "./types";
import Array "mo:base/Array";
import Principal "mo:base/Principal";
type Entry = Types.Entry;
var entries: [Entry] = [];
public query func listEntries(max: Nat): async [Entry] {
var m = max;
if (entries.len() == 0) {
return []; };
if (m > entries.len()) {
m := entries.len();
};
};