-
Notifications
You must be signed in to change notification settings - Fork 16
/
Extensions.yml
63 lines (60 loc) · 1.9 KB
/
Extensions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
### YamlMime:TSType
name: Extensions
uid: adaptive-expressions.Extensions
package: adaptive-expressions
summary: Some util and extension functions
fullName: Extensions
remarks: ''
isPreview: false
isDeprecated: false
type: class
methods:
- name: isMemoryInterface(any)
uid: adaptive-expressions.Extensions.isMemoryInterface
package: adaptive-expressions
summary: >-
Patch method
TODO: is there any better solution?
To judge if an object is implements MemoryInterface. Same with 'is
MemoryInterface' in C#
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'static function isMemoryInterface(obj: any): boolean'
parameters:
- id: obj
type: any
description: The object to evaluate.
return:
description: True if the object implements MemoryInterface; False if it isn't.
type: boolean
- name: 'randomNext(MemoryInterface, number, number)'
uid: adaptive-expressions.Extensions.randomNext
package: adaptive-expressions
summary: >-
Generator random seed and value from properties.
If value is not null, the mock random value result would be: min + (value
% (max - min)).
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: >-
static function randomNext(memory: MemoryInterface, min: number, max:
number): number
parameters:
- id: memory
type: <xref uid="adaptive-expressions.MemoryInterface" />
description: memory state.
- id: min
type: number
description: The inclusive lower bound of the random number returned.
- id: max
type: number
description: >-
The exclusive upper bound of the random number returned. max must be
greater than or equal to min.
return:
description: Random value.
type: number