@types/devicefarmer__stf-syrup 1.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE
@@ -0,0 +1,74 @@
1
+ # Installation
2
+ > `npm install --save @types/devicefarmer__stf-syrup`
3
+
4
+ # Summary
5
+ This package contains type definitions for @devicefarmer/stf-syrup (https://github.com/DeviceFarmer/stf-syrup/).
6
+
7
+ # Details
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/devicefarmer__stf-syrup.
9
+ ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/devicefarmer__stf-syrup/index.d.ts)
10
+ ````ts
11
+ import Bluebird = require("bluebird");
12
+
13
+ type extractDesRet<RetT> = RetT extends SyrupI<never, never, infer RetX> ? RetX
14
+ : unknown;
15
+ type extractBluebirdReturnR<RetT> = RetT extends Bluebird<infer RetX> ? RetX
16
+ : RetT;
17
+ declare class SyrupI<
18
+ OptionsT extends object = any, // TODO: find a way to remove any. Maybe we union all the options that are needed for each dependency?
19
+ DepsT extends SyrupI[] = [],
20
+ RetT = unknown,
21
+ DepsRetsT extends unknown[] = [], // TODO: maybe we can extract DepsRetsT somehow?
22
+ > {
23
+ constructor(options: OptionsT | null);
24
+ define<
25
+ BodyT extends (options: OptionsT, ...deps: DepsRetsT) => unknown,
26
+ >(
27
+ body: BodyT,
28
+ ): SyrupI<
29
+ OptionsT,
30
+ DepsT,
31
+ extractBluebirdReturnR<ReturnType<typeof body>>,
32
+ DepsRetsT
33
+ >;
34
+ dependency<DepT extends SyrupI<never, never>>(
35
+ dep: DepT,
36
+ ): SyrupI<
37
+ OptionsT,
38
+ [...DepsT, DepT],
39
+ RetT,
40
+ [...DepsRetsT, extractDesRet<DepT>]
41
+ >;
42
+ consume<OptionsT>(
43
+ overrides: OptionsT,
44
+ ): Bluebird<RetT>;
45
+ invoke(overrides: OptionsT, ...args: DepsT[]): RetT;
46
+ }
47
+
48
+ declare function ParallelSyrup(
49
+ options?: object,
50
+ ): SyrupI;
51
+ declare namespace ParallelSyrup {
52
+ const Syrup: SyrupI;
53
+ }
54
+
55
+ declare function SerialSyrup(
56
+ options?: object,
57
+ ): SyrupI;
58
+ declare namespace SerialSyrup {
59
+ const Syrup: SyrupI;
60
+ }
61
+
62
+ declare const Syrup: typeof ParallelSyrup & {
63
+ serial: typeof SerialSyrup;
64
+ };
65
+ export = Syrup;
66
+
67
+ ````
68
+
69
+ ### Additional Details
70
+ * Last updated: Tue, 08 Apr 2025 10:37:25 GMT
71
+ * Dependencies: [@types/bluebird](https://npmjs.com/package/@types/bluebird)
72
+
73
+ # Credits
74
+ These definitions were written by [Maksim Alzhanov](https://github.com/irdkwmnsb).
@@ -0,0 +1,55 @@
1
+ import Bluebird = require("bluebird");
2
+
3
+ type extractDesRet<RetT> = RetT extends SyrupI<never, never, infer RetX> ? RetX
4
+ : unknown;
5
+ type extractBluebirdReturnR<RetT> = RetT extends Bluebird<infer RetX> ? RetX
6
+ : RetT;
7
+ declare class SyrupI<
8
+ OptionsT extends object = any, // TODO: find a way to remove any. Maybe we union all the options that are needed for each dependency?
9
+ DepsT extends SyrupI[] = [],
10
+ RetT = unknown,
11
+ DepsRetsT extends unknown[] = [], // TODO: maybe we can extract DepsRetsT somehow?
12
+ > {
13
+ constructor(options: OptionsT | null);
14
+ define<
15
+ BodyT extends (options: OptionsT, ...deps: DepsRetsT) => unknown,
16
+ >(
17
+ body: BodyT,
18
+ ): SyrupI<
19
+ OptionsT,
20
+ DepsT,
21
+ extractBluebirdReturnR<ReturnType<typeof body>>,
22
+ DepsRetsT
23
+ >;
24
+ dependency<DepT extends SyrupI<never, never>>(
25
+ dep: DepT,
26
+ ): SyrupI<
27
+ OptionsT,
28
+ [...DepsT, DepT],
29
+ RetT,
30
+ [...DepsRetsT, extractDesRet<DepT>]
31
+ >;
32
+ consume<OptionsT>(
33
+ overrides: OptionsT,
34
+ ): Bluebird<RetT>;
35
+ invoke(overrides: OptionsT, ...args: DepsT[]): RetT;
36
+ }
37
+
38
+ declare function ParallelSyrup(
39
+ options?: object,
40
+ ): SyrupI;
41
+ declare namespace ParallelSyrup {
42
+ const Syrup: SyrupI;
43
+ }
44
+
45
+ declare function SerialSyrup(
46
+ options?: object,
47
+ ): SyrupI;
48
+ declare namespace SerialSyrup {
49
+ const Syrup: SyrupI;
50
+ }
51
+
52
+ declare const Syrup: typeof ParallelSyrup & {
53
+ serial: typeof SerialSyrup;
54
+ };
55
+ export = Syrup;
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@types/devicefarmer__stf-syrup",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript definitions for @devicefarmer/stf-syrup",
5
+ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/devicefarmer__stf-syrup",
6
+ "license": "MIT",
7
+ "contributors": [
8
+ {
9
+ "name": "Maksim Alzhanov",
10
+ "githubUsername": "irdkwmnsb",
11
+ "url": "https://github.com/irdkwmnsb"
12
+ }
13
+ ],
14
+ "main": "",
15
+ "types": "index.d.ts",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
19
+ "directory": "types/devicefarmer__stf-syrup"
20
+ },
21
+ "scripts": {},
22
+ "dependencies": {
23
+ "@types/bluebird": "^1.0.8"
24
+ },
25
+ "peerDependencies": {},
26
+ "typesPublisherContentHash": "0441e09a1cdc7c1b3d773ce270562a3dbd5a02af2703e98c0b6c9c17aa0b141f",
27
+ "typeScriptVersion": "5.1"
28
+ }