@effect/language-service 0.62.0 → 0.62.1
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 +10 -2
- package/cli.js.map +1 -1
- package/effect-lsp-patch-utils.js +10 -2
- package/effect-lsp-patch-utils.js.map +1 -1
- package/index.js +10 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +10 -2
- package/transform.js.map +1 -1
package/cli.js
CHANGED
|
@@ -31668,6 +31668,8 @@ var nanoLayer2 = (fa) => pipe(
|
|
|
31668
31668
|
)
|
|
31669
31669
|
);
|
|
31670
31670
|
function makeTypeCheckerUtils(ts, typeChecker, tsUtils) {
|
|
31671
|
+
const readonlyArraySymbol = typeChecker.resolveName("ReadonlyArray", void 0, ts.SymbolFlags.Type, false);
|
|
31672
|
+
const globalReadonlyArrayType = readonlyArraySymbol ? typeChecker.getDeclaredTypeOfSymbol(readonlyArraySymbol) : void 0;
|
|
31671
31673
|
function isUnion4(type2) {
|
|
31672
31674
|
return !!(type2.flags & ts.TypeFlags.Union);
|
|
31673
31675
|
}
|
|
@@ -31677,6 +31679,9 @@ function makeTypeCheckerUtils(ts, typeChecker, tsUtils) {
|
|
|
31677
31679
|
function isThisTypeParameter(type2) {
|
|
31678
31680
|
return !!(type2.flags & ts.TypeFlags.TypeParameter && type2.isThisType);
|
|
31679
31681
|
}
|
|
31682
|
+
function isReadonlyArrayType(type2) {
|
|
31683
|
+
return type2 && "target" in type2 && type2.target === globalReadonlyArrayType;
|
|
31684
|
+
}
|
|
31680
31685
|
function isMissingIntrinsicType(type2) {
|
|
31681
31686
|
return (type2.flags & ts.TypeFlags.Undefined) !== 0 && "debugIntrinsicName" in type2 && type2.debugIntrinsicName === "missing";
|
|
31682
31687
|
}
|
|
@@ -31984,6 +31989,7 @@ function makeTypeCheckerUtils(ts, typeChecker, tsUtils) {
|
|
|
31984
31989
|
}
|
|
31985
31990
|
return {
|
|
31986
31991
|
isUnion: isUnion4,
|
|
31992
|
+
isReadonlyArrayType,
|
|
31987
31993
|
isMissingIntrinsicType,
|
|
31988
31994
|
getTypeParameterAtPosition,
|
|
31989
31995
|
getMissingTypeEntriesInTargetType,
|
|
@@ -33804,13 +33810,15 @@ var processArrayType = fn2(
|
|
|
33804
33810
|
"StructuralSchemaGen.processArrayType"
|
|
33805
33811
|
)(
|
|
33806
33812
|
function* (type2, context7) {
|
|
33807
|
-
const { createApiCall, typeChecker } = yield* service2(StructuralSchemaGenContext);
|
|
33813
|
+
const { createApiCall, typeChecker, typeCheckerUtils } = yield* service2(StructuralSchemaGenContext);
|
|
33808
33814
|
const typeArgs = typeChecker.getTypeArguments(type2);
|
|
33809
33815
|
if (typeArgs.length === 0) {
|
|
33810
33816
|
return yield* fail18(new UnsupportedTypeError(type2, "Array type has no type arguments"));
|
|
33811
33817
|
}
|
|
33812
33818
|
const elementSchema = yield* processType(typeArgs[0], context7);
|
|
33813
|
-
|
|
33819
|
+
const expr = createApiCall("Array", [elementSchema]);
|
|
33820
|
+
if (typeCheckerUtils.isReadonlyArrayType(type2)) return [expr, false];
|
|
33821
|
+
return [createApiCall("mutable", [expr]), false];
|
|
33814
33822
|
}
|
|
33815
33823
|
);
|
|
33816
33824
|
var processTupleType = fn2(
|