@akanjs/test 0.0.39 → 0.0.41

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/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/test",
3
- "version": "0.0.39",
3
+ "version": "0.0.41",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { sampleOf } from "./sampleOf";
2
+ export { sample } from "./sample";
@@ -0,0 +1,14 @@
1
+ import { Dayjs } from "@akanjs/base";
2
+ export declare const sample: Chance.Chance & {
3
+ dayjs: (opt?: {
4
+ string?: boolean | undefined;
5
+ american?: boolean | undefined;
6
+ year?: number | undefined;
7
+ month?: number | undefined;
8
+ day?: number | undefined;
9
+ min?: Dayjs | undefined;
10
+ max?: Dayjs | undefined;
11
+ }) => Dayjs;
12
+ pick: <T = any>(arr: T[] | readonly T[]) => T;
13
+ picks: <T>(arr: T[] | readonly T[], count?: number, allowDuplicate?: boolean) => T[];
14
+ };
@@ -0,0 +1,6 @@
1
+ import { BaseObject, Type } from "@akanjs/base";
2
+ import { DocumentModel } from "@akanjs/constant";
3
+ export type SampleOf<Model> = DocumentModel<{
4
+ [K in keyof Model as Model[K] extends BaseObject ? never : K]: NonNullable<Model[K]>;
5
+ }>;
6
+ export declare const sampleOf: <Model>(modelRef: Type<Model>) => DocumentModel<{ [K in keyof Model as Model[K] extends BaseObject ? never : K]: NonNullable<Model[K]>; }>;