@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/cli.js
CHANGED
|
@@ -30581,6 +30581,7 @@ function make64(ts2, tsUtils, typeChecker) {
|
|
|
30581
30581
|
className: atLocation.name,
|
|
30582
30582
|
selfTypeNode,
|
|
30583
30583
|
args: wholeCall.arguments,
|
|
30584
|
+
options: wholeCall.arguments[1],
|
|
30584
30585
|
accessors: accessors2,
|
|
30585
30586
|
dependencies
|
|
30586
30587
|
};
|
|
@@ -31327,7 +31328,7 @@ var missingEffectServiceDependency = createDiagnostic({
|
|
|
31327
31328
|
orElse14(() => void_8)
|
|
31328
31329
|
);
|
|
31329
31330
|
if (serviceResult) {
|
|
31330
|
-
const { className,
|
|
31331
|
+
const { className, options: options3 } = serviceResult;
|
|
31331
31332
|
const classSymbol = typeChecker.getSymbolAtLocation(className);
|
|
31332
31333
|
if (classSymbol) {
|
|
31333
31334
|
const classType = typeChecker.getTypeOfSymbol(classSymbol);
|
|
@@ -31348,11 +31349,17 @@ var missingEffectServiceDependency = createDiagnostic({
|
|
|
31348
31349
|
excludeNever
|
|
31349
31350
|
);
|
|
31350
31351
|
const providedIndexes = /* @__PURE__ */ new Set();
|
|
31351
|
-
const
|
|
31352
|
-
|
|
31353
|
-
|
|
31352
|
+
const optionsType = typeChecker.getTypeAtLocation(options3);
|
|
31353
|
+
const dependenciesProperty = typeChecker.getPropertyOfType(optionsType, "dependencies");
|
|
31354
|
+
let types = [];
|
|
31355
|
+
if (dependenciesProperty) {
|
|
31356
|
+
const dependenciesTypes = typeChecker.getTypeOfSymbolAtLocation(dependenciesProperty, options3);
|
|
31357
|
+
const numberIndexType = dependenciesTypes.getNumberIndexType();
|
|
31358
|
+
types = numberIndexType ? unrollUnionMembers(numberIndexType) : [];
|
|
31359
|
+
}
|
|
31360
|
+
for (const depType of types) {
|
|
31354
31361
|
const depLayerResult = yield* pipe(
|
|
31355
|
-
typeParser.layerType(depType,
|
|
31362
|
+
typeParser.layerType(depType, options3),
|
|
31356
31363
|
orElse14(() => void_8)
|
|
31357
31364
|
);
|
|
31358
31365
|
if (depLayerResult) {
|