@atscript/moost-mongo 0.1.21 → 0.1.22

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +2 -6
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AsMongo, AsCollection } from '@atscript/mongo';
2
- import { TAtscriptAnnotatedType, Validator, ValidatorError } from '@atscript/typescript/utils';
2
+ import { TAtscriptAnnotatedType, TAtscriptDataType, Validator, ValidatorError } from '@atscript/typescript/utils';
3
3
  import { HttpError } from '@moostjs/event-http';
4
4
  import { Document, Filter, WithId, InsertOneResult, InsertManyResult, UpdateResult, DeleteResult, DeleteOptions, ObjectId, InsertOneOptions, BulkWriteOptions, ReplaceOptions, UpdateFilter, UpdateOptions } from 'mongodb';
5
5
  import { TConsoleBase, Moost } from 'moost';
@@ -23,11 +23,7 @@ import { UrlqlQuery } from 'urlql';
23
23
  * @typeParam T - The **atscript** annotated class (constructor) representing the
24
24
  * collection schema. Must be decorated with `@AsCollection`.
25
25
  */
26
- declare class AsMongoController<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedType, DataType = T extends {
27
- type: {
28
- __dataType?: infer D;
29
- };
30
- } ? unknown extends D ? T extends new (...args: any[]) => infer I ? I : unknown : D : unknown> {
26
+ declare class AsMongoController<T extends TAtscriptAnnotatedType = TAtscriptAnnotatedType, DataType = TAtscriptDataType<T>> {
31
27
  protected asMongo: AsMongo;
32
28
  protected type: T;
33
29
  /** Reference to the lazily created {@link AsCollection}. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/moost-mongo",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "Atscript Mongo for Moost.",
5
5
  "keywords": [
6
6
  "annotations",
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "vitest": "3.2.4",
42
- "@atscript/core": "^0.1.21"
42
+ "@atscript/core": "^0.1.22"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@moostjs/event-http": "^0.5.32",
46
46
  "mongodb": "^6.17.0",
47
47
  "moost": "^0.5.32",
48
- "@atscript/mongo": "^0.1.21",
49
- "@atscript/typescript": "^0.1.21"
48
+ "@atscript/mongo": "^0.1.22",
49
+ "@atscript/typescript": "^0.1.22"
50
50
  },
51
51
  "scripts": {
52
52
  "pub": "pnpm publish --access public",