Skip to content

Commit 839e368

Browse files
author
Mathias Lorenzen
committed
stuff
1 parent 44b4428 commit 839e368

27 files changed

+538
-218
lines changed

dist/spec/index.test.js

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/spec/index.test.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/Context.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
export declare class ProxyPropertyContext {
2+
name: string;
3+
type: 'function' | 'object';
4+
access: 'write' | 'read';
5+
}
6+
export declare class ProxyMethodContext {
7+
arguments: any[];
8+
}
9+
export declare class ProxyCallRecords {
10+
expected: ProxyCallRecord[];
11+
actual: ProxyCallRecord[];
12+
}
13+
export declare class ProxyObjectContext {
14+
property: ProxyPropertyContext;
15+
method: ProxyMethodContext;
16+
calls: ProxyCallRecords;
17+
}
18+
export declare class ProxyCallRecord {
19+
arguments?: Array<any>;
20+
callCount: number;
21+
}

dist/src/Context.js

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/Context.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/ProxyPropertyContext.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export declare class ProxyPropertyContext {
2+
}

dist/src/ProxyPropertyContext.js

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/ProxyPropertyContext.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/Transformations.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export declare type FunctionSubstitute<F extends any[], T> = (...args: F) => (T & {
2+
returns: (...args: T[]) => void;
3+
});
4+
export declare type PropertySubstitute<T> = T & {
5+
returns: (...args: T[]) => void;
6+
};
7+
export declare type ObjectSubstitute<T extends Object> = ObjectSubstituteTransformation<T> & {
8+
received(amount?: number): T;
9+
};
10+
declare type ObjectSubstituteTransformation<T extends Object> = {
11+
[P in keyof T]: T[P] extends (...args: infer F) => infer R ? FunctionSubstitute<F, R> : PropertySubstitute<T[P]>;
12+
};
13+
export {};

dist/src/Transformations.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)