Skip to content

Commit 1df62c6

Browse files
CyberT33NCyberT33N
authored andcommitted
feat(CCS-001): changed interface IFixtureInserted
1 parent aa87ebd commit 1df62c6

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

src/FixturesManager.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,22 @@ export interface IFixtureDoc {
4848
* and its lean (plain object) version, along with the Mongoose model reference.
4949
* @interface IFixtureInserted
5050
*
51-
* @template TSchema - The type of the document schema used by the model.
52-
*
53-
* @property {(mongoose.Document<TSchema> & Required<{ _id: unknown }>} doc
51+
* @property {(mongoose.Document<any> & Required<{ _id: unknown; }>)} doc
5452
* - The inserted Mongoose document instance
5553
*
56-
* @property {(mongoose.FlattenMaps<TSchema> & Required<{ _id: unknown }>} docLean
54+
* @property {(mongoose.FlattenMaps<any> & Required<{ _id: unknown; }>)} docLean
5755
* - The lean version of the inserted document
5856
*
59-
* @property {{ [x: string]: any } & Required<{ _id: unknown }>} docToObject
57+
* @property {({ [x: string]: any; } & Required<{ _id: unknown; }>)} docToObject
6058
* - Plain JavaScript object representation of the inserted document.
6159
*
6260
* @property {mongoose.Model<any>} Model - Reference to the Mongoose model used for the insertion.
6361
* @property {MongoMemoryServer} mongoServer - Instance of the in-memory MongoDB server used.
6462
*/
65-
export interface IFixtureInserted<TSchema = any> {
66-
doc: (mongoose.Document<TSchema> & Required<{ _id: unknown; }>)
67-
docLean: (mongoose.FlattenMaps<TSchema> & Required<{ _id: unknown; }>)
68-
docToObject: (TSchema & Required<{ _id: unknown; }>)
63+
export interface IFixtureInserted {
64+
doc: (mongoose.Document<any> & Required<{ _id: unknown; }>)
65+
docLean: (mongoose.FlattenMaps<any> & Required<{ _id: unknown; }>)
66+
docToObject: ({ [x: string]: any; } & Required<{ _id: unknown; }>)
6967
Model: mongoose.Model<any>
7068
mongoServer: MongoMemoryServer
7169
}

test/unit/src/FixturesManager.test-d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@ describe('[TYPE TEST] - src/FixturesManager.ts', () => {
7272
*
7373
* @template TSchema - The type of the document schema used by the model.
7474
*
75-
* @property {(mongoose.Document<TSchema> & Required<{ _id: unknown }>} doc
75+
* @property {(mongoose.Document<any> & Required<{ _id: unknown; }>)} doc
7676
* - The inserted Mongoose document instance
7777
*
78-
* @property {(mongoose.FlattenMaps<TSchema> & Required<{ _id: unknown }>} docLean
78+
* @property {(mongoose.FlattenMaps<any> & Required<{ _id: unknown; }>)} docLean
7979
* - The lean version of the inserted document
8080
*
81-
* @property {{ [x: string]: any } & Required<{ _id: unknown }>} docToObject
81+
* @property {({ [x: string]: any; } & Required<{ _id: unknown; }>)} docToObject
8282
* - Plain JavaScript object representation of the inserted document.
8383
*
8484
* @property {mongoose.Model<any>} Model - Reference to the Mongoose model used for the insertion.
8585
* @property {MongoMemoryServer} mongoServer - Instance of the in-memory MongoDB server used.
8686
*/
87-
interface IFixtureInserted_Test<TSchema = any> {
88-
doc: (mongoose.Document<TSchema> & Required<{ _id: unknown; }>)
89-
docLean: (mongoose.FlattenMaps<TSchema> & Required<{ _id: unknown; }>)
90-
docToObject: (TSchema & Required<{ _id: unknown; }>)
87+
interface IFixtureInserted_Test {
88+
doc: (mongoose.Document<any> & Required<{ _id: unknown; }>)
89+
docLean: (mongoose.FlattenMaps<any> & Required<{ _id: unknown; }>)
90+
docToObject: ({ [x: string]: any; } & Required<{ _id: unknown; }>)
9191
Model: mongoose.Model<any>
9292
mongoServer: MongoMemoryServer
9393
}

0 commit comments

Comments
 (0)