We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc5f11b commit 329a40aCopy full SHA for 329a40a
src/index.ts
@@ -1,6 +1,19 @@
1
-import { Substitute, SubstituteOf } from './Substitute';
+import { Substitute, SubstituteOf } from './Substitute'
2
3
-export { Arg } from './Arguments';
4
-export { Substitute, SubstituteOf };
+export { Arg } from './Arguments'
+export { Substitute, SubstituteOf }
5
6
-export default Substitute;
+export default Substitute
7
+
8
+interface Calc {
9
+ version: number
10
+ add(a: number, b: number): number
11
+}
12
13
+const c = Substitute.for<Calc>()
14
15
+c.add(2, 3).returns(5)
16
+console.log(c.add(2, 3))
17
18
+c.version.returns(123)
19
+console.log(c.version)
0 commit comments