@effect/language-service 0.31.0 → 0.31.2
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/cli.js +12 -5
- package/cli.js.map +1 -1
- package/index.js +14 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +12 -5
- package/transform.js.map +1 -1
package/package.json
CHANGED
package/transform.js
CHANGED
|
@@ -2920,6 +2920,7 @@ function make2(ts, tsUtils, typeChecker) {
|
|
|
2920
2920
|
className: atLocation.name,
|
|
2921
2921
|
selfTypeNode,
|
|
2922
2922
|
args: wholeCall.arguments,
|
|
2923
|
+
options: wholeCall.arguments[1],
|
|
2923
2924
|
accessors: accessors2,
|
|
2924
2925
|
dependencies
|
|
2925
2926
|
};
|
|
@@ -3666,7 +3667,7 @@ var missingEffectServiceDependency = createDiagnostic({
|
|
|
3666
3667
|
orElse2(() => void_)
|
|
3667
3668
|
);
|
|
3668
3669
|
if (serviceResult) {
|
|
3669
|
-
const { className,
|
|
3670
|
+
const { className, options } = serviceResult;
|
|
3670
3671
|
const classSymbol = typeChecker.getSymbolAtLocation(className);
|
|
3671
3672
|
if (classSymbol) {
|
|
3672
3673
|
const classType = typeChecker.getTypeOfSymbol(classSymbol);
|
|
@@ -3687,11 +3688,17 @@ var missingEffectServiceDependency = createDiagnostic({
|
|
|
3687
3688
|
excludeNever
|
|
3688
3689
|
);
|
|
3689
3690
|
const providedIndexes = /* @__PURE__ */ new Set();
|
|
3690
|
-
const
|
|
3691
|
-
|
|
3692
|
-
|
|
3691
|
+
const optionsType = typeChecker.getTypeAtLocation(options);
|
|
3692
|
+
const dependenciesProperty = typeChecker.getPropertyOfType(optionsType, "dependencies");
|
|
3693
|
+
let types = [];
|
|
3694
|
+
if (dependenciesProperty) {
|
|
3695
|
+
const dependenciesTypes = typeChecker.getTypeOfSymbolAtLocation(dependenciesProperty, options);
|
|
3696
|
+
const numberIndexType = dependenciesTypes.getNumberIndexType();
|
|
3697
|
+
types = numberIndexType ? unrollUnionMembers(numberIndexType) : [];
|
|
3698
|
+
}
|
|
3699
|
+
for (const depType of types) {
|
|
3693
3700
|
const depLayerResult = yield* pipe(
|
|
3694
|
-
typeParser.layerType(depType,
|
|
3701
|
+
typeParser.layerType(depType, options),
|
|
3695
3702
|
orElse2(() => void_)
|
|
3696
3703
|
);
|
|
3697
3704
|
if (depLayerResult) {
|