@moddable/typings 1.0.3 → 5.0.0

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.
@@ -1,60 +1,50 @@
1
1
  /*
2
- * Copyright (c) 2019-2020 Bradley Farias
3
- *
4
- * This file is part of the Moddable SDK Tools.
5
- *
6
- * The Moddable SDK Tools is free software: you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation, either version 3 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * The Moddable SDK Tools is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
18
- *
19
- */
2
+ * Copyright (c) 2019-2020 Bradley Farias
3
+ *
4
+ * This file is part of the Moddable SDK Tools.
5
+ *
6
+ * The Moddable SDK Tools is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * The Moddable SDK Tools is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
20
 
21
- declare module "instrumentation" {
22
- type PixelsDrawn = 1;
23
- type FramesDrawn = 2;
24
- type NetworkBytesRead = 3;
25
- type NetworkBytesWritten = 4;
26
- type NetworkSockets = 5;
27
- type Timers = 6;
28
- type Files = 7;
29
- type POCODisplayListUsed = 8;
30
- type PIUCommandListUsed = 9;
31
- type SystemFreeMemory = 10;
32
- type SlotHeapSize = 11;
33
- type ChunkHeapSize = 12;
34
- type KeysUsed = 13;
35
- type GarbageCollectionCount = 14;
36
- type ModulesLoaded = 15;
37
- type StackPeak = 16;
38
- type InstrumentationOption = (
39
- PixelsDrawn |
40
- FramesDrawn |
41
- NetworkBytesRead |
42
- NetworkBytesWritten |
43
- NetworkSockets |
44
- Timers |
45
- Files |
46
- POCODisplayListUsed |
47
- PIUCommandListUsed |
48
- SystemFreeMemory |
49
- SlotHeapSize |
50
- ChunkHeapSize |
51
- KeysUsed |
52
- GarbageCollectionCount |
53
- ModulesLoaded |
54
- StackPeak
55
- );
56
- var Instrumentation: {
57
- get: (what: InstrumentationOption) => number;
58
- };
59
- export {Instrumentation as default};
21
+ declare module 'instrumentation' {
22
+ type InstrumentationKeys =
23
+ | 'Pixels Drawn'
24
+ | 'Frames Drawn'
25
+ | 'Network Bytes Read'
26
+ | 'Network Bytes Written'
27
+ | 'Network Sockets'
28
+ | 'Timers'
29
+ | 'Files'
30
+ | 'Poco Display List Used'
31
+ | 'Piu Command List Used'
32
+ | 'Turns'
33
+ | 'CPU 0'
34
+ | 'CPU 1'
35
+ | 'System Free Memory'
36
+ | 'XS Slot Heap Used'
37
+ | 'XS Chunk Heap Used'
38
+ | 'XS Keys Used'
39
+ | 'XS Garbage Collection Count'
40
+ | 'XS Modules Loaded'
41
+ | 'XS Stack Used'
42
+ | 'XS Promises Settled';
43
+
44
+ var Instrumentation: {
45
+ get: (what: number | undefined) => number | undefined;
46
+ map: (name: InstrumentationKeys) => number | undefined;
47
+ name: (what: number | undefined) => string | undefined;
48
+ };
49
+ export { Instrumentation as default };
60
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moddable/typings",
3
- "version": "1.0.3",
3
+ "version": "5.0.0",
4
4
  "main": "",
5
5
  "types": [
6
6
  "xs.d.ts",
@@ -53,6 +53,7 @@ declare module 'pins/audioout' {
53
53
  public enqueue(stream: number, kind: MixerKind, buffer: HostBuffer, repeat: number, offset: number, count: number): void
54
54
  public enqueue(stream: number, kind: MixerTone, frequency: number, samples: number): void
55
55
  public enqueue(stream: number, kind: MixerSilence, samples: number): void
56
+ public enqueue(stream: number, kind: MixerVolume, volume: number): void
56
57
 
57
58
  public mix(samplesNeeded: number): HostBuffer
58
59
  public mix(buffer: BufferLike): void
package/time.d.ts CHANGED
@@ -27,6 +27,7 @@ declare module "time" {
27
27
  dst: number;
28
28
  ticks: number;
29
29
  delta(start: number, end?: number): number;
30
+ readonly microseconds?: number;
30
31
  }
31
32
  export {Time as default};
32
33
  }