We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 724574e commit 9f4a996Copy full SHA for 9f4a996
src/types/interface-types.ts
@@ -0,0 +1,16 @@
1
+/**
2
+ * Represents a type that can either be a value of type `T` or `undefined`.
3
+ */
4
+export type Optional<T> = T | undefined;
5
+
6
7
+ * Represents a type that can either be a value of type `T` or `null`.
8
9
+export type Nullable<T> = T | null;
10
11
12
+ * Represents an object type where all properties are optional, and included properties can be null or undefined.
13
14
+export type PartialNullable<T> = {
15
+ [P in keyof T]?: Nullable<T[P]>;
16
+};
0 commit comments