Use NotNullish

This commit is contained in:
Andrew Morris
2023-05-29 14:01:52 +10:00
parent 64caac9254
commit 3d6c8fda2d
2 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,6 @@
export default class BinaryTree<T extends {}> {
import type NotNullish from "./NotNullish.ts";
export default class BinaryTree<T extends NotNullish> {
left?: BinaryTree<T>;
value?: T;
right?: BinaryTree<T>;

View File

@@ -0,0 +1,3 @@
type NotNullish = NonNullable<unknown>;
export default NotNullish;