@asapjs/sequelize 0.0.7 → 0.0.8

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/package.json +1 -1
  2. package/src/type/index.ts +14 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asapjs/sequelize",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/type/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BlobSize, DataTypes, TextLength } from 'sequelize';
2
- import isClass from '../utils/isClass';
2
+ import isClass from 'src/utils/isClass';
3
3
  import { ExtendableDto } from '../dto';
4
4
 
5
5
  const data: { [key: string]: any } = {};
@@ -244,10 +244,21 @@ export const TypeIs = {
244
244
  // };
245
245
  // };
246
246
 
247
- export type DtoOrTypeIs = typeof ExtendableDto | (() => TypeIsData);
247
+ export type DtoOrTypeIs = typeof ExtendableDto | (() => TypeIsData) | TypeArrayClass;
248
+
249
+ interface TypeArrayClass {
250
+ new (n: string): TypeArrayInterface;
251
+ }
252
+
253
+ export interface TypeArrayInterface {
254
+ swagger: () => {
255
+ type: string;
256
+ items: any;
257
+ };
258
+ }
248
259
 
249
260
  export const TypeArray = (value: DtoOrTypeIs) => {
250
- return class {
261
+ return class TypeArrayClass implements TypeArrayInterface {
251
262
  public swagger = () => {
252
263
  const isDto = isClass(value);
253
264