Browse Source

chore: improve types

e22m4u 2 years ago
parent
commit
62292b7cd5
1 changed files with 14 additions and 2 deletions
  1. 14 2
      src/types.d.ts

+ 14 - 2
src/types.d.ts

@@ -9,10 +9,22 @@ export declare type AnyObject = {
  * Model data.
  */
 export declare type ModelData = {
-  [property: string]: unknown;
+  [property: string]: PropertyData;
 };
 
+/**
+ * Property data.
+ */
+export type PropertyData =
+  | PropertyData[]
+  | ModelData
+  | string
+  | number
+  | boolean
+  | null
+  | undefined;
+
 /**
  * Identifier.
  */
-export declare type Identifier = unknown;
+export declare type Identifier = number | string;