Skip to content

Commit bac48c5

Browse files
committedMar 29, 2024
Simplify broken types
1 parent ea53956 commit bac48c5

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed
 

‎packages/model/src/-private/model.d.ts

+6-15
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,12 @@ class Model extends EmberObject {
5959
serialize(): Record<string, unknown>;
6060

6161
static modelName: string;
62-
static fields: Map<keyof this & string, 'attribute' | 'belongsTo' | 'hasMany'>;
63-
static attributes: Map<keyof this & string, AttributeSchema>;
64-
static relationshipsByName: Map<keyof this & string, RelationshipSchema>;
65-
static eachAttribute<K extends keyof this & string>(
66-
callback: (this: ModelSchema<this>, key: K, attribute: AttributeSchema) => void,
67-
binding?: T
68-
): void;
69-
static eachRelationship<K extends keyof this & string>(
70-
callback: (this: ModelSchema<this>, key: K, relationship: RelationshipSchema) => void,
71-
binding?: T
72-
): void;
73-
static eachTransformedAttribute<K extends keyof this & string>(
74-
callback: (this: ModelSchema<this>, key: K, type: string) => void,
75-
binding?: T
76-
): void;
62+
static fields: Map<string, 'attribute' | 'belongsTo' | 'hasMany'>;
63+
static attributes: Map<string, AttributeSchema>;
64+
static relationshipsByName: Map<string, RelationshipSchema>;
65+
static eachAttribute(callback: (key: string, attribute: AttributeSchema) => void, binding?: unknown): void;
66+
static eachRelationship(callback: (key: string, relationship: RelationshipSchema) => void, binding?: unknown): void;
67+
static eachTransformedAttribute(callback: (key: string, type: string) => void, binding?: unknown): void;
7768
static determineRelationshipType(
7869
knownSide: RelationshipSchema,
7970
store: Store

0 commit comments

Comments
 (0)