strict-ts-lib-v5.9-branded-es2015-generator 0.2.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.
Files changed (2) hide show
  1. package/index.d.ts +65 -0
  2. package/package.json +21 -0
package/index.d.ts ADDED
@@ -0,0 +1,65 @@
1
+ /// <reference no-default-lib="true"/>
2
+
3
+ /// <reference lib="es2015.iterable" />
4
+
5
+ interface Generator<
6
+ T = unknown,
7
+ TReturn = any,
8
+ TNext = unknown,
9
+ > extends IteratorObject<T, TReturn, TNext> {
10
+ // NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
11
+ next(...[value]: readonly [] | readonly [TNext]): IteratorResult<T, TReturn>;
12
+ return(value: TReturn): IteratorResult<T, TReturn>;
13
+ throw(e: unknown): IteratorResult<T, TReturn>;
14
+ [Symbol.iterator](): Generator<T, TReturn, TNext>;
15
+ }
16
+
17
+ interface GeneratorFunction {
18
+ /**
19
+ * Creates a new Generator object.
20
+ * @param args A list of arguments the function accepts.
21
+ */
22
+ new (...args: readonly unknown[]): Generator;
23
+ /**
24
+ * Creates a new Generator object.
25
+ * @param args A list of arguments the function accepts.
26
+ */
27
+ (...args: readonly unknown[]): Generator;
28
+ /**
29
+ * The length of the arguments.
30
+ */
31
+ readonly length: NumberType.ArraySize;
32
+ /**
33
+ * Returns the name of the function.
34
+ */
35
+ readonly name: string;
36
+ /**
37
+ * A reference to the prototype.
38
+ */
39
+ readonly prototype: Generator;
40
+ }
41
+
42
+ interface GeneratorFunctionConstructor {
43
+ /**
44
+ * Creates a new Generator function.
45
+ * @param args A list of arguments the function accepts.
46
+ */
47
+ new (...args: readonly string[]): GeneratorFunction;
48
+ /**
49
+ * Creates a new Generator function.
50
+ * @param args A list of arguments the function accepts.
51
+ */
52
+ (...args: readonly string[]): GeneratorFunction;
53
+ /**
54
+ * The length of the arguments.
55
+ */
56
+ readonly length: NumberType.ArraySize;
57
+ /**
58
+ * Returns the name of the function.
59
+ */
60
+ readonly name: string;
61
+ /**
62
+ * A reference to the prototype.
63
+ */
64
+ readonly prototype: GeneratorFunction;
65
+ }
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "strict-ts-lib-v5.9-branded-es2015-generator",
3
+ "version": "0.2.0",
4
+ "private": false,
5
+ "description": "Strict TypeScript lib",
6
+ "license": "Apache-2.0",
7
+ "author": "noshiro-pf <noshiro.pf@gmail.com>",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/noshiro-pf/strict-typescript-lib.git"
11
+ },
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "types": "./index.d.ts",
15
+ "dependencies": {
16
+ "ts-type-forge": "^7.0.0"
17
+ },
18
+ "peerDependencies": {
19
+ "typescript": ">=5.9.0 <6.0.0"
20
+ }
21
+ }