@speclynx/apidom-datamodel 4.0.3 → 4.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/types.ts DELETED
@@ -1,72 +0,0 @@
1
- /**
2
- * Shared type definitions for ApiDOM data model.
3
- * These types are used across multiple modules to ensure consistency.
4
- */
5
-
6
- import type ObjectElement from './primitives/ObjectElement.ts';
7
- import type Metadata from './Metadata.ts';
8
-
9
- /**
10
- * Metadata input for an element constructor/setter.
11
- * Can be a Metadata instance or a plain object.
12
- * Common meta properties include: id, classes, title, description, links.
13
- * @public
14
- */
15
- export type Meta = Metadata | Record<string, unknown>;
16
-
17
- /**
18
- * Attributes associated with an element.
19
- * Can be a plain object or an ObjectElement.
20
- * Attributes are element-specific properties beyond the standard meta.
21
- * @public
22
- */
23
- export type Attributes = Record<string, unknown> | ObjectElement;
24
-
25
- /**
26
- * Primitive JavaScript values that can be element content.
27
- * @public
28
- */
29
- export type PrimitiveValue = string | number | boolean | null | undefined;
30
-
31
- /**
32
- * Predicate function for filtering/matching elements.
33
- * @public
34
- */
35
- export type ElementPredicate<T = unknown> = (element: T) => boolean;
36
-
37
- /**
38
- * Callback for array-style iteration (element, index, array).
39
- * @public
40
- */
41
- export type ArrayCallback<T, U> = (element: T, index: number, array: T[]) => U;
42
-
43
- /**
44
- * Callback for object-style iteration (value, key, member).
45
- * @public
46
- */
47
- export type ObjectCallback<V, K, M, U> = (value: V, key: K, member: M) => U;
48
-
49
- /**
50
- * Type for objects that can convert to JavaScript values.
51
- * @public
52
- */
53
- export interface ToValue<T = unknown> {
54
- toValue(): T;
55
- }
56
-
57
- /**
58
- * Type for objects that support deep equality comparison.
59
- * @public
60
- */
61
- export interface Equatable {
62
- equals(value: unknown): boolean;
63
- }
64
-
65
- /**
66
- * Type for freezable objects (immutable after freeze).
67
- * @public
68
- */
69
- export interface Freezable {
70
- freeze(): void;
71
- readonly isFrozen: boolean;
72
- }