@confect/core 2.0.0 → 4.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.
- package/CHANGELOG.md +8 -0
- package/dist/FunctionProvenance.d.ts +110 -0
- package/dist/FunctionProvenance.d.ts.map +1 -0
- package/dist/FunctionProvenance.js +19 -0
- package/dist/FunctionProvenance.js.map +1 -0
- package/dist/FunctionSpec.d.ts +108 -27
- package/dist/FunctionSpec.d.ts.map +1 -1
- package/dist/FunctionSpec.js +28 -3
- package/dist/FunctionSpec.js.map +1 -1
- package/dist/Ref.d.ts +15 -18
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +6 -6
- package/dist/Ref.js.map +1 -1
- package/dist/Refs.d.ts +4 -3
- package/dist/Refs.d.ts.map +1 -1
- package/dist/Refs.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/FunctionProvenance.ts +60 -0
- package/src/FunctionSpec.ts +202 -57
- package/src/Ref.ts +27 -67
- package/src/Refs.ts +19 -6
- package/src/index.ts +1 -0
package/src/Refs.ts
CHANGED
|
@@ -38,18 +38,31 @@ type OmitEmpty<T> = {
|
|
|
38
38
|
[K in keyof T as keyof T[K] extends never ? never : K]: T[K];
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
type FunctionSpecMatchesPredicate<
|
|
42
|
+
FunctionSpec_ extends FunctionSpec.AnyWithProps,
|
|
43
|
+
Predicate extends Ref.Any,
|
|
44
|
+
> =
|
|
45
|
+
Ref.Ref<
|
|
46
|
+
FunctionSpec.GetRuntimeAndFunctionType<FunctionSpec_>,
|
|
47
|
+
FunctionSpec.GetFunctionVisibility<FunctionSpec_>,
|
|
48
|
+
any,
|
|
49
|
+
any
|
|
50
|
+
> extends Predicate
|
|
51
|
+
? true
|
|
52
|
+
: false;
|
|
53
|
+
|
|
41
54
|
type FilteredFunctions<
|
|
42
|
-
|
|
55
|
+
FunctionSpecs extends FunctionSpec.AnyWithProps,
|
|
43
56
|
Predicate extends Ref.Any,
|
|
44
57
|
> = {
|
|
45
|
-
[Name in FunctionSpec.Name<
|
|
46
|
-
|
|
58
|
+
[Name in FunctionSpec.Name<FunctionSpecs> as FunctionSpec.WithName<
|
|
59
|
+
FunctionSpecs,
|
|
47
60
|
Name
|
|
48
|
-
> extends infer
|
|
49
|
-
?
|
|
61
|
+
> extends infer FunctionSpec_ extends FunctionSpec.AnyWithProps
|
|
62
|
+
? FunctionSpecMatchesPredicate<FunctionSpec_, Predicate> extends true
|
|
50
63
|
? Name
|
|
51
64
|
: never
|
|
52
|
-
: never]: FunctionSpec.WithName<
|
|
65
|
+
: never]: FunctionSpec.WithName<FunctionSpecs, Name> extends infer F extends
|
|
53
66
|
FunctionSpec.AnyWithProps
|
|
54
67
|
? Ref.FromFunctionSpec<F>
|
|
55
68
|
: never;
|
package/src/index.ts
CHANGED