arktypea
arktype11mo ago
Micha

How to create an array of type.instanceOf?

This doesn't work:
const documentReference = type.instanceOf(DocumentReference);

scope({
  user: {
    accounts: "documentReference[]",
  }
}


const documentReference = type.instanceOf(DocumentReference);

scope({
  user: {
    accounts: type.instanceOf(DocumentReference)[],
  }
}


I only get it working without an array:
const documentReference = type.instanceOf(DocumentReference);

scope({
  account: {
    user: type.instanceOf(DocumentReference),
  }
}
Was this page helpful?