Remove non-null assertions for Db collections (#3111)

* 📘 Remove unions to `null`

*  Track `Db` initialization state

* 🔥 Remove non-null assertions

* 👕 Remove lint exceptions

* 🔥 Remove leftover assertion
This commit is contained in:
Iván Ovejero
2022-04-14 09:02:12 +02:00
committed by GitHub
parent e45ac7eb6a
commit 3e5d981f3f
31 changed files with 130 additions and 152 deletions

View File

@@ -42,8 +42,7 @@ export class ListWorkflowCommand extends Command {
findQuery.active = flags.active === 'true';
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const workflows = await Db.collections.Workflow!.find(findQuery);
const workflows = await Db.collections.Workflow.find(findQuery);
if (flags.onlyId) {
workflows.forEach((workflow) => console.log(workflow.id));
} else {