@effect/language-service 0.28.2 → 0.28.3
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 +2286 -3559
- package/cli.js.map +1 -1
- package/index.js +388 -384
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/transform.js +24 -24
- package/transform.js.map +1 -1
package/index.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __export = (target, all3) => {
|
|
4
|
-
for (var name in all3)
|
|
5
|
-
__defProp(target, name, { get: all3[name], enumerable: true });
|
|
6
|
-
};
|
|
7
2
|
|
|
8
|
-
// node_modules/.pnpm/effect@3.
|
|
3
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Function.js
|
|
9
4
|
var isFunction = (input) => typeof input === "function";
|
|
10
5
|
var dual = function(arity, body) {
|
|
11
6
|
if (typeof arity === "function") {
|
|
@@ -101,7 +96,7 @@ function pipe(a, ab, bc, cd, de, ef, fg, gh, hi) {
|
|
|
101
96
|
}
|
|
102
97
|
}
|
|
103
98
|
|
|
104
|
-
// node_modules/.pnpm/effect@3.
|
|
99
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Equivalence.js
|
|
105
100
|
var make = (isEquivalent) => (self, that) => self === that || isEquivalent(self, that);
|
|
106
101
|
var array = (item) => make((self, that) => {
|
|
107
102
|
if (self.length !== that.length) {
|
|
@@ -116,12 +111,8 @@ var array = (item) => make((self, that) => {
|
|
|
116
111
|
return true;
|
|
117
112
|
});
|
|
118
113
|
|
|
119
|
-
// node_modules/.pnpm/effect@3.
|
|
120
|
-
var
|
|
121
|
-
var getCurrentVersion = () => moduleVersion;
|
|
122
|
-
|
|
123
|
-
// node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/GlobalValue.js
|
|
124
|
-
var globalStoreId = `effect/GlobalValue/globalStoreId/${/* @__PURE__ */ getCurrentVersion()}`;
|
|
114
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/GlobalValue.js
|
|
115
|
+
var globalStoreId = `effect/GlobalValue`;
|
|
125
116
|
var globalStore;
|
|
126
117
|
var globalValue = (id, compute) => {
|
|
127
118
|
if (!globalStore) {
|
|
@@ -134,156 +125,20 @@ var globalValue = (id, compute) => {
|
|
|
134
125
|
return globalStore.get(id);
|
|
135
126
|
};
|
|
136
127
|
|
|
137
|
-
// node_modules/.pnpm/effect@3.
|
|
138
|
-
var Predicate_exports = {};
|
|
139
|
-
__export(Predicate_exports, {
|
|
140
|
-
all: () => all,
|
|
141
|
-
and: () => and,
|
|
142
|
-
compose: () => compose,
|
|
143
|
-
eqv: () => eqv,
|
|
144
|
-
every: () => every,
|
|
145
|
-
hasProperty: () => hasProperty,
|
|
146
|
-
implies: () => implies,
|
|
147
|
-
isBigInt: () => isBigInt,
|
|
148
|
-
isBoolean: () => isBoolean,
|
|
149
|
-
isDate: () => isDate,
|
|
150
|
-
isError: () => isError,
|
|
151
|
-
isFunction: () => isFunction2,
|
|
152
|
-
isIterable: () => isIterable,
|
|
153
|
-
isMap: () => isMap,
|
|
154
|
-
isNever: () => isNever,
|
|
155
|
-
isNotNull: () => isNotNull,
|
|
156
|
-
isNotNullable: () => isNotNullable,
|
|
157
|
-
isNotUndefined: () => isNotUndefined,
|
|
158
|
-
isNull: () => isNull,
|
|
159
|
-
isNullable: () => isNullable,
|
|
160
|
-
isNumber: () => isNumber,
|
|
161
|
-
isObject: () => isObject,
|
|
162
|
-
isPromise: () => isPromise,
|
|
163
|
-
isPromiseLike: () => isPromiseLike,
|
|
164
|
-
isPropertyKey: () => isPropertyKey,
|
|
165
|
-
isReadonlyRecord: () => isReadonlyRecord,
|
|
166
|
-
isRecord: () => isRecord,
|
|
167
|
-
isRecordOrArray: () => isRecordOrArray,
|
|
168
|
-
isRegExp: () => isRegExp,
|
|
169
|
-
isSet: () => isSet,
|
|
170
|
-
isString: () => isString,
|
|
171
|
-
isSymbol: () => isSymbol,
|
|
172
|
-
isTagged: () => isTagged,
|
|
173
|
-
isTruthy: () => isTruthy,
|
|
174
|
-
isTupleOf: () => isTupleOf,
|
|
175
|
-
isTupleOfAtLeast: () => isTupleOfAtLeast,
|
|
176
|
-
isUint8Array: () => isUint8Array,
|
|
177
|
-
isUndefined: () => isUndefined,
|
|
178
|
-
isUnknown: () => isUnknown,
|
|
179
|
-
mapInput: () => mapInput,
|
|
180
|
-
nand: () => nand,
|
|
181
|
-
nor: () => nor,
|
|
182
|
-
not: () => not,
|
|
183
|
-
or: () => or,
|
|
184
|
-
product: () => product,
|
|
185
|
-
productMany: () => productMany,
|
|
186
|
-
some: () => some,
|
|
187
|
-
struct: () => struct,
|
|
188
|
-
tuple: () => tuple,
|
|
189
|
-
xor: () => xor
|
|
190
|
-
});
|
|
191
|
-
var mapInput = /* @__PURE__ */ dual(2, (self, f) => (b) => self(f(b)));
|
|
192
|
-
var isTupleOf = /* @__PURE__ */ dual(2, (self, n) => self.length === n);
|
|
193
|
-
var isTupleOfAtLeast = /* @__PURE__ */ dual(2, (self, n) => self.length >= n);
|
|
194
|
-
var isTruthy = (input) => !!input;
|
|
195
|
-
var isSet = (input) => input instanceof Set;
|
|
196
|
-
var isMap = (input) => input instanceof Map;
|
|
128
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Predicate.js
|
|
197
129
|
var isString = (input) => typeof input === "string";
|
|
198
130
|
var isNumber = (input) => typeof input === "number";
|
|
199
131
|
var isBoolean = (input) => typeof input === "boolean";
|
|
200
|
-
var isBigInt = (input) => typeof input === "bigint";
|
|
201
|
-
var isSymbol = (input) => typeof input === "symbol";
|
|
202
|
-
var isPropertyKey = (u) => isString(u) || isNumber(u) || isSymbol(u);
|
|
203
132
|
var isFunction2 = isFunction;
|
|
204
|
-
var isUndefined = (input) => input === void 0;
|
|
205
|
-
var isNotUndefined = (input) => input !== void 0;
|
|
206
|
-
var isNull = (input) => input === null;
|
|
207
|
-
var isNotNull = (input) => input !== null;
|
|
208
|
-
var isNever = (_) => false;
|
|
209
|
-
var isUnknown = (_) => true;
|
|
210
133
|
var isRecordOrArray = (input) => typeof input === "object" && input !== null;
|
|
211
134
|
var isObject = (input) => isRecordOrArray(input) || isFunction2(input);
|
|
212
135
|
var hasProperty = /* @__PURE__ */ dual(2, (self, property) => isObject(self) && property in self);
|
|
213
|
-
var isTagged = /* @__PURE__ */ dual(2, (self, tag) => hasProperty(self, "_tag") && self["_tag"] === tag);
|
|
214
|
-
var isNullable = (input) => input === null || input === void 0;
|
|
215
|
-
var isNotNullable = (input) => input !== null && input !== void 0;
|
|
216
|
-
var isError = (input) => input instanceof Error;
|
|
217
|
-
var isUint8Array = (input) => input instanceof Uint8Array;
|
|
218
|
-
var isDate = (input) => input instanceof Date;
|
|
219
|
-
var isIterable = (input) => hasProperty(input, Symbol.iterator);
|
|
220
136
|
var isRecord = (input) => isRecordOrArray(input) && !Array.isArray(input);
|
|
221
|
-
var isReadonlyRecord = isRecord;
|
|
222
|
-
var isPromise = (input) => hasProperty(input, "then") && "catch" in input && isFunction2(input.then) && isFunction2(input.catch);
|
|
223
|
-
var isPromiseLike = (input) => hasProperty(input, "then") && isFunction2(input.then);
|
|
224
|
-
var isRegExp = (input) => input instanceof RegExp;
|
|
225
|
-
var compose = /* @__PURE__ */ dual(2, (ab, bc) => (a) => ab(a) && bc(a));
|
|
226
|
-
var product = (self, that) => ([a, b]) => self(a) && that(b);
|
|
227
|
-
var all = (collection) => {
|
|
228
|
-
return (as) => {
|
|
229
|
-
let collectionIndex = 0;
|
|
230
|
-
for (const p of collection) {
|
|
231
|
-
if (collectionIndex >= as.length) {
|
|
232
|
-
break;
|
|
233
|
-
}
|
|
234
|
-
if (p(as[collectionIndex]) === false) {
|
|
235
|
-
return false;
|
|
236
|
-
}
|
|
237
|
-
collectionIndex++;
|
|
238
|
-
}
|
|
239
|
-
return true;
|
|
240
|
-
};
|
|
241
|
-
};
|
|
242
|
-
var productMany = (self, collection) => {
|
|
243
|
-
const rest = all(collection);
|
|
244
|
-
return ([head2, ...tail]) => self(head2) === false ? false : rest(tail);
|
|
245
|
-
};
|
|
246
|
-
var tuple = (...elements) => all(elements);
|
|
247
|
-
var struct = (fields) => {
|
|
248
|
-
const keys = Object.keys(fields);
|
|
249
|
-
return (a) => {
|
|
250
|
-
for (const key of keys) {
|
|
251
|
-
if (!fields[key](a[key])) {
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return true;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
var not = (self) => (a) => !self(a);
|
|
259
|
-
var or = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) || that(a));
|
|
260
|
-
var and = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) && that(a));
|
|
261
|
-
var xor = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) !== that(a));
|
|
262
|
-
var eqv = /* @__PURE__ */ dual(2, (self, that) => (a) => self(a) === that(a));
|
|
263
|
-
var implies = /* @__PURE__ */ dual(2, (antecedent, consequent) => (a) => antecedent(a) ? consequent(a) : true);
|
|
264
|
-
var nor = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) || that(a)));
|
|
265
|
-
var nand = /* @__PURE__ */ dual(2, (self, that) => (a) => !(self(a) && that(a)));
|
|
266
|
-
var every = (collection) => (a) => {
|
|
267
|
-
for (const p of collection) {
|
|
268
|
-
if (!p(a)) {
|
|
269
|
-
return false;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return true;
|
|
273
|
-
};
|
|
274
|
-
var some = (collection) => (a) => {
|
|
275
|
-
for (const p of collection) {
|
|
276
|
-
if (p(a)) {
|
|
277
|
-
return true;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
return false;
|
|
281
|
-
};
|
|
282
137
|
|
|
283
|
-
// node_modules/.pnpm/effect@3.
|
|
138
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/errors.js
|
|
284
139
|
var getBugErrorMessage = (message) => `BUG: ${message} - please report an issue at https://github.com/Effect-TS/effect/issues`;
|
|
285
140
|
|
|
286
|
-
// node_modules/.pnpm/effect@3.
|
|
141
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Utils.js
|
|
287
142
|
var GenKindTypeId = /* @__PURE__ */ Symbol.for("effect/Gen/GenKind");
|
|
288
143
|
var GenKindImpl = class {
|
|
289
144
|
value;
|
|
@@ -411,7 +266,7 @@ var internalCall = isNotOptimizedAway ? standard.effect_internal_function : forc
|
|
|
411
266
|
var genConstructor = function* () {
|
|
412
267
|
}.constructor;
|
|
413
268
|
|
|
414
|
-
// node_modules/.pnpm/effect@3.
|
|
269
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Hash.js
|
|
415
270
|
var randomHashCache = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Hash/randomHashCache"), () => /* @__PURE__ */ new WeakMap());
|
|
416
271
|
var symbol = /* @__PURE__ */ Symbol.for("effect/Hash");
|
|
417
272
|
var hash = (self) => {
|
|
@@ -510,7 +365,7 @@ var cached = function() {
|
|
|
510
365
|
return hash2;
|
|
511
366
|
};
|
|
512
367
|
|
|
513
|
-
// node_modules/.pnpm/effect@3.
|
|
368
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Equal.js
|
|
514
369
|
var symbol2 = /* @__PURE__ */ Symbol.for("effect/Equal");
|
|
515
370
|
function equals() {
|
|
516
371
|
if (arguments.length === 1) {
|
|
@@ -564,7 +419,7 @@ function compareBoth(self, that) {
|
|
|
564
419
|
var isEqual = (u) => hasProperty(u, symbol2);
|
|
565
420
|
var equivalence = () => equals;
|
|
566
421
|
|
|
567
|
-
// node_modules/.pnpm/effect@3.
|
|
422
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Inspectable.js
|
|
568
423
|
var NodeInspectSymbol = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
569
424
|
var toJSON = (x) => {
|
|
570
425
|
try {
|
|
@@ -616,7 +471,7 @@ var redact = (u) => {
|
|
|
616
471
|
return u;
|
|
617
472
|
};
|
|
618
473
|
|
|
619
|
-
// node_modules/.pnpm/effect@3.
|
|
474
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Pipeable.js
|
|
620
475
|
var pipeArguments = (self, args2) => {
|
|
621
476
|
switch (args2.length) {
|
|
622
477
|
case 0:
|
|
@@ -649,10 +504,14 @@ var pipeArguments = (self, args2) => {
|
|
|
649
504
|
}
|
|
650
505
|
};
|
|
651
506
|
|
|
652
|
-
// node_modules/.pnpm/effect@3.
|
|
507
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/opCodes/effect.js
|
|
653
508
|
var OP_COMMIT = "Commit";
|
|
654
509
|
|
|
655
|
-
// node_modules/.pnpm/effect@3.
|
|
510
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/version.js
|
|
511
|
+
var moduleVersion = "3.17.1";
|
|
512
|
+
var getCurrentVersion = () => moduleVersion;
|
|
513
|
+
|
|
514
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/effectable.js
|
|
656
515
|
var EffectTypeId = /* @__PURE__ */ Symbol.for("effect/Effect");
|
|
657
516
|
var StreamTypeId = /* @__PURE__ */ Symbol.for("effect/Stream");
|
|
658
517
|
var SinkTypeId = /* @__PURE__ */ Symbol.for("effect/Sink");
|
|
@@ -739,7 +598,7 @@ var StructuralCommitPrototype = {
|
|
|
739
598
|
...StructuralPrototype
|
|
740
599
|
};
|
|
741
600
|
|
|
742
|
-
// node_modules/.pnpm/effect@3.
|
|
601
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/option.js
|
|
743
602
|
var TypeId = /* @__PURE__ */ Symbol.for("effect/Option");
|
|
744
603
|
var CommonProto = {
|
|
745
604
|
...EffectPrototype,
|
|
@@ -791,13 +650,13 @@ var isOption = (input) => hasProperty(input, TypeId);
|
|
|
791
650
|
var isNone = (fa) => fa._tag === "None";
|
|
792
651
|
var isSome = (fa) => fa._tag === "Some";
|
|
793
652
|
var none = /* @__PURE__ */ Object.create(NoneProto);
|
|
794
|
-
var
|
|
653
|
+
var some = (value) => {
|
|
795
654
|
const a = Object.create(SomeProto);
|
|
796
655
|
a.value = value;
|
|
797
656
|
return a;
|
|
798
657
|
};
|
|
799
658
|
|
|
800
|
-
// node_modules/.pnpm/effect@3.
|
|
659
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/either.js
|
|
801
660
|
var TypeId2 = /* @__PURE__ */ Symbol.for("effect/Either");
|
|
802
661
|
var CommonProto2 = {
|
|
803
662
|
...EffectPrototype,
|
|
@@ -859,7 +718,7 @@ var right = (right3) => {
|
|
|
859
718
|
return a;
|
|
860
719
|
};
|
|
861
720
|
|
|
862
|
-
// node_modules/.pnpm/effect@3.
|
|
721
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Either.js
|
|
863
722
|
var right2 = right;
|
|
864
723
|
var left2 = left;
|
|
865
724
|
var isLeft2 = isLeft;
|
|
@@ -867,13 +726,13 @@ var isRight2 = isRight;
|
|
|
867
726
|
var map = /* @__PURE__ */ dual(2, (self, f) => isRight2(self) ? right2(f(self.right)) : left2(self.left));
|
|
868
727
|
var getOrElse = /* @__PURE__ */ dual(2, (self, onLeft) => isLeft2(self) ? onLeft(self.left) : self.right);
|
|
869
728
|
|
|
870
|
-
// node_modules/.pnpm/effect@3.
|
|
729
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Order.js
|
|
871
730
|
var make2 = (compare) => (self, that) => self === that ? 0 : compare(self, that);
|
|
872
731
|
var string2 = /* @__PURE__ */ make2((self, that) => self < that ? -1 : 1);
|
|
873
732
|
|
|
874
|
-
// node_modules/.pnpm/effect@3.
|
|
733
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Option.js
|
|
875
734
|
var none2 = () => none;
|
|
876
|
-
var
|
|
735
|
+
var some2 = some;
|
|
877
736
|
var isNone2 = isNone;
|
|
878
737
|
var isSome2 = isSome;
|
|
879
738
|
var match = /* @__PURE__ */ dual(2, (self, {
|
|
@@ -882,14 +741,14 @@ var match = /* @__PURE__ */ dual(2, (self, {
|
|
|
882
741
|
}) => isNone2(self) ? onNone() : onSome(self.value));
|
|
883
742
|
var getOrElse2 = /* @__PURE__ */ dual(2, (self, onNone) => isNone2(self) ? onNone() : self.value);
|
|
884
743
|
var orElse = /* @__PURE__ */ dual(2, (self, that) => isNone2(self) ? that() : self);
|
|
885
|
-
var fromNullable = (nullableValue) => nullableValue == null ? none2() :
|
|
744
|
+
var fromNullable = (nullableValue) => nullableValue == null ? none2() : some2(nullableValue);
|
|
886
745
|
var getOrUndefined = /* @__PURE__ */ getOrElse2(constUndefined);
|
|
887
|
-
var map2 = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() :
|
|
746
|
+
var map2 = /* @__PURE__ */ dual(2, (self, f) => isNone2(self) ? none2() : some2(f(self.value)));
|
|
888
747
|
|
|
889
|
-
// node_modules/.pnpm/effect@3.
|
|
748
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/array.js
|
|
890
749
|
var isNonEmptyArray = (self) => self.length > 0;
|
|
891
750
|
|
|
892
|
-
// node_modules/.pnpm/effect@3.
|
|
751
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Array.js
|
|
893
752
|
var fromIterable = (collection) => Array.isArray(collection) ? collection : Array.from(collection);
|
|
894
753
|
var append = /* @__PURE__ */ dual(2, (self, last) => [...self, last]);
|
|
895
754
|
var appendAll = /* @__PURE__ */ dual(2, (self, that) => fromIterable(self).concat(fromIterable(that)));
|
|
@@ -900,7 +759,7 @@ var isNonEmptyReadonlyArray = isNonEmptyArray;
|
|
|
900
759
|
var isOutOfBounds = (i, as) => i < 0 || i >= as.length;
|
|
901
760
|
var get = /* @__PURE__ */ dual(2, (self, index) => {
|
|
902
761
|
const i = Math.floor(index);
|
|
903
|
-
return isOutOfBounds(i, self) ? none2() :
|
|
762
|
+
return isOutOfBounds(i, self) ? none2() : some2(self[i]);
|
|
904
763
|
});
|
|
905
764
|
var unsafeGet = /* @__PURE__ */ dual(2, (self, index) => {
|
|
906
765
|
const i = Math.floor(index);
|
|
@@ -957,7 +816,7 @@ var filter = /* @__PURE__ */ dual(2, (self, predicate) => {
|
|
|
957
816
|
}
|
|
958
817
|
return out;
|
|
959
818
|
});
|
|
960
|
-
var
|
|
819
|
+
var every = /* @__PURE__ */ dual(2, (self, refinement) => self.every(refinement));
|
|
961
820
|
var dedupeWith = /* @__PURE__ */ dual(2, (self, isEquivalent) => {
|
|
962
821
|
const input = fromIterable(self);
|
|
963
822
|
if (isNonEmptyReadonlyArray(input)) {
|
|
@@ -1226,7 +1085,7 @@ function cachedBy(fa, type, lookupKey) {
|
|
|
1226
1085
|
var option = (fa) => {
|
|
1227
1086
|
const nano = Object.create(MatchProto);
|
|
1228
1087
|
nano[args] = fa;
|
|
1229
|
-
nano[contA] = (_) => succeed(
|
|
1088
|
+
nano[contA] = (_) => succeed(some2(_));
|
|
1230
1089
|
nano[contE] = (_) => _ instanceof NanoDefectException ? fail(_) : succeed(none2());
|
|
1231
1090
|
return nano;
|
|
1232
1091
|
};
|
|
@@ -1237,7 +1096,7 @@ var ignore = (fa) => {
|
|
|
1237
1096
|
nano[contE] = (_) => _ instanceof NanoDefectException ? fail(_) : void_;
|
|
1238
1097
|
return nano;
|
|
1239
1098
|
};
|
|
1240
|
-
var
|
|
1099
|
+
var all = fn("all")(
|
|
1241
1100
|
function* (...args2) {
|
|
1242
1101
|
const results = [];
|
|
1243
1102
|
for (const fa of args2) {
|
|
@@ -1483,7 +1342,7 @@ var findImportedModuleIdentifier = fn("AST.findImportedModuleIdentifier")(
|
|
|
1483
1342
|
} else if (ts.isNamedImports(namedBindings)) {
|
|
1484
1343
|
for (const importSpecifier of namedBindings.elements) {
|
|
1485
1344
|
const importProperty = fromNullable(importSpecifier.propertyName).pipe(
|
|
1486
|
-
orElse(() =>
|
|
1345
|
+
orElse(() => some2(importSpecifier.name))
|
|
1487
1346
|
);
|
|
1488
1347
|
if (yield* test(importSpecifier.name, statement.moduleSpecifier, importProperty)) {
|
|
1489
1348
|
return importSpecifier.name;
|
|
@@ -1516,20 +1375,20 @@ var simplifyTypeNode = fn("AST.simplifyTypeNode")(function* (typeNode) {
|
|
|
1516
1375
|
function collectCallable(typeNode2) {
|
|
1517
1376
|
if (ts.isParenthesizedTypeNode(typeNode2)) return collectCallable(typeNode2.type);
|
|
1518
1377
|
if (ts.isFunctionTypeNode(typeNode2)) {
|
|
1519
|
-
return
|
|
1378
|
+
return some2([
|
|
1520
1379
|
ts.factory.createCallSignature(typeNode2.typeParameters, typeNode2.parameters, typeNode2.type)
|
|
1521
1380
|
]);
|
|
1522
1381
|
}
|
|
1523
1382
|
if (ts.isTypeLiteralNode(typeNode2)) {
|
|
1524
1383
|
const allCallSignatures = typeNode2.members.every(ts.isCallSignatureDeclaration);
|
|
1525
1384
|
if (allCallSignatures) {
|
|
1526
|
-
return
|
|
1385
|
+
return some2(typeNode2.members);
|
|
1527
1386
|
}
|
|
1528
1387
|
}
|
|
1529
1388
|
if (ts.isIntersectionTypeNode(typeNode2)) {
|
|
1530
1389
|
const members = typeNode2.types.map((node) => collectCallable(node));
|
|
1531
1390
|
if (members.every(isSome2)) {
|
|
1532
|
-
return
|
|
1391
|
+
return some2(members.map((_) => isSome2(_) ? _.value : []).flat());
|
|
1533
1392
|
}
|
|
1534
1393
|
}
|
|
1535
1394
|
return none2();
|
|
@@ -2445,7 +2304,7 @@ function make3(ts, typeChecker) {
|
|
|
2445
2304
|
return invariantTypeArgument(propertyType);
|
|
2446
2305
|
};
|
|
2447
2306
|
const effectVarianceStruct = (type, atLocation) => map4(
|
|
2448
|
-
|
|
2307
|
+
all(
|
|
2449
2308
|
varianceStructCovariantType(type, atLocation, "_A"),
|
|
2450
2309
|
varianceStructCovariantType(type, atLocation, "_E"),
|
|
2451
2310
|
varianceStructCovariantType(type, atLocation, "_R")
|
|
@@ -2453,7 +2312,7 @@ function make3(ts, typeChecker) {
|
|
|
2453
2312
|
([A, E, R]) => ({ A, E, R })
|
|
2454
2313
|
);
|
|
2455
2314
|
const layerVarianceStruct = (type, atLocation) => map4(
|
|
2456
|
-
|
|
2315
|
+
all(
|
|
2457
2316
|
varianceStructContravariantType(type, atLocation, "_ROut"),
|
|
2458
2317
|
varianceStructCovariantType(type, atLocation, "_E"),
|
|
2459
2318
|
varianceStructCovariantType(type, atLocation, "_RIn")
|
|
@@ -2761,7 +2620,7 @@ function make3(ts, typeChecker) {
|
|
|
2761
2620
|
(node) => node
|
|
2762
2621
|
);
|
|
2763
2622
|
const effectSchemaVarianceStruct = (type, atLocation) => map4(
|
|
2764
|
-
|
|
2623
|
+
all(
|
|
2765
2624
|
varianceStructInvariantType(type, atLocation, "_A"),
|
|
2766
2625
|
varianceStructInvariantType(type, atLocation, "_I"),
|
|
2767
2626
|
varianceStructCovariantType(type, atLocation, "_R")
|
|
@@ -2793,7 +2652,7 @@ function make3(ts, typeChecker) {
|
|
|
2793
2652
|
(type) => type
|
|
2794
2653
|
);
|
|
2795
2654
|
const contextTagVarianceStruct = (type, atLocation) => map4(
|
|
2796
|
-
|
|
2655
|
+
all(
|
|
2797
2656
|
varianceStructInvariantType(type, atLocation, "_Identifier"),
|
|
2798
2657
|
varianceStructInvariantType(type, atLocation, "_Service")
|
|
2799
2658
|
),
|
|
@@ -3071,7 +2930,7 @@ var importFromBarrel = createDiagnostic({
|
|
|
3071
2930
|
const typeChecker = yield* service(TypeCheckerApi);
|
|
3072
2931
|
const program = yield* service(TypeScriptProgram);
|
|
3073
2932
|
const packageNamesToCheck = flatten(
|
|
3074
|
-
yield*
|
|
2933
|
+
yield* all(
|
|
3075
2934
|
...languageServicePluginOptions.namespaceImportPackages.map(
|
|
3076
2935
|
(packageName) => resolveModulePattern(sourceFile, packageName)
|
|
3077
2936
|
)
|
|
@@ -3323,7 +3182,7 @@ var missingEffectContext = createDiagnostic({
|
|
|
3323
3182
|
const typeParser = yield* service(TypeParser);
|
|
3324
3183
|
const typeOrder = yield* deterministicTypeOrder;
|
|
3325
3184
|
const checkForMissingContextTypes = (node, expectedType, valueNode, realType) => pipe(
|
|
3326
|
-
|
|
3185
|
+
all(
|
|
3327
3186
|
typeParser.effectType(expectedType, node),
|
|
3328
3187
|
typeParser.effectType(realType, valueNode)
|
|
3329
3188
|
),
|
|
@@ -3389,7 +3248,7 @@ var missingEffectError = createDiagnostic({
|
|
|
3389
3248
|
[ts.factory.createStringLiteral(message)]
|
|
3390
3249
|
);
|
|
3391
3250
|
const checkForMissingErrorTypes = (node, expectedType, valueNode, realType) => pipe(
|
|
3392
|
-
|
|
3251
|
+
all(
|
|
3393
3252
|
typeParser.effectType(expectedType, node),
|
|
3394
3253
|
typeParser.effectType(realType, valueNode)
|
|
3395
3254
|
),
|
|
@@ -3688,7 +3547,7 @@ var multipleEffectProvide = createDiagnostic({
|
|
|
3688
3547
|
if (chunk.length < 2) continue;
|
|
3689
3548
|
report({
|
|
3690
3549
|
node: chunk[0].node,
|
|
3691
|
-
messageText: "
|
|
3550
|
+
messageText: "Avoid chaining Effect.provide calls, as this can lead to service lifecycle issues. Instead, merge layers and provide them in a single call.",
|
|
3692
3551
|
fixes: [{
|
|
3693
3552
|
fixName: "multipleEffectProvide_fix",
|
|
3694
3553
|
description: "Combine into a single provide",
|
|
@@ -4493,41 +4352,6 @@ var completions = [
|
|
|
4493
4352
|
schemaBrand
|
|
4494
4353
|
];
|
|
4495
4354
|
|
|
4496
|
-
// node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/encoding/common.js
|
|
4497
|
-
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
4498
|
-
|
|
4499
|
-
// node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/encoding/base64.js
|
|
4500
|
-
var encode = (bytes) => {
|
|
4501
|
-
const length = bytes.length;
|
|
4502
|
-
let result = "";
|
|
4503
|
-
let i;
|
|
4504
|
-
for (i = 2; i < length; i += 3) {
|
|
4505
|
-
result += base64abc[bytes[i - 2] >> 2];
|
|
4506
|
-
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
4507
|
-
result += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
4508
|
-
result += base64abc[bytes[i] & 63];
|
|
4509
|
-
}
|
|
4510
|
-
if (i === length + 1) {
|
|
4511
|
-
result += base64abc[bytes[i - 2] >> 2];
|
|
4512
|
-
result += base64abc[(bytes[i - 2] & 3) << 4];
|
|
4513
|
-
result += "==";
|
|
4514
|
-
}
|
|
4515
|
-
if (i === length) {
|
|
4516
|
-
result += base64abc[bytes[i - 2] >> 2];
|
|
4517
|
-
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
4518
|
-
result += base64abc[(bytes[i - 1] & 15) << 2];
|
|
4519
|
-
result += "=";
|
|
4520
|
-
}
|
|
4521
|
-
return result;
|
|
4522
|
-
};
|
|
4523
|
-
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
4524
|
-
|
|
4525
|
-
// node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/internal/encoding/base64Url.js
|
|
4526
|
-
var encode2 = (data) => encode(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
4527
|
-
|
|
4528
|
-
// node_modules/.pnpm/effect@3.16.12/node_modules/effect/dist/esm/Encoding.js
|
|
4529
|
-
var encodeBase64Url = (input) => typeof input === "string" ? encode2(encoder.encode(input)) : encode2(input);
|
|
4530
|
-
|
|
4531
4355
|
// src/core/AutoImport.ts
|
|
4532
4356
|
var makeAutoImportProvider = fn("TypeScriptApi")(function* (fromSourceFile) {
|
|
4533
4357
|
const ts = yield* service(TypeScriptApi);
|
|
@@ -4586,7 +4410,7 @@ var makeAutoImportProvider = fn("TypeScriptApi")(function* (fromSourceFile) {
|
|
|
4586
4410
|
);
|
|
4587
4411
|
if (!_entrypoints) return;
|
|
4588
4412
|
if (!isArray(_entrypoints)) return;
|
|
4589
|
-
if (!
|
|
4413
|
+
if (!every(isString)) return;
|
|
4590
4414
|
const entrypoints = _entrypoints.map((_) => String(_));
|
|
4591
4415
|
const info = parsePackageContentNameAndVersionFromScope({ packageJsonScope: packageJsonInfo });
|
|
4592
4416
|
if (!info) return { entrypoints, exportedKeys: [] };
|
|
@@ -4694,7 +4518,7 @@ var makeAutoImportProvider = fn("TypeScriptApi")(function* (fromSourceFile) {
|
|
|
4694
4518
|
if (!moduleSpecifier) return fileName;
|
|
4695
4519
|
return moduleSpecifier;
|
|
4696
4520
|
};
|
|
4697
|
-
|
|
4521
|
+
const resolve = (exportFileName, exportName) => {
|
|
4698
4522
|
const excludedExports = mapFilenameToExportExcludes.get(exportFileName);
|
|
4699
4523
|
if (excludedExports && excludedExports.includes(exportName)) return;
|
|
4700
4524
|
const mapToNamespace = mapFromBarrelToNamespace.get(exportFileName);
|
|
@@ -4734,10 +4558,166 @@ var makeAutoImportProvider = fn("TypeScriptApi")(function* (fromSourceFile) {
|
|
|
4734
4558
|
};
|
|
4735
4559
|
}
|
|
4736
4560
|
};
|
|
4561
|
+
const sortText = (exportFileName, exportName) => {
|
|
4562
|
+
const excludedExports = mapFilenameToExportExcludes.get(exportFileName);
|
|
4563
|
+
if (excludedExports && excludedExports.includes(exportName)) return;
|
|
4564
|
+
const mapToNamespace = mapFromBarrelToNamespace.get(exportFileName);
|
|
4565
|
+
if (mapToNamespace && exportName in mapToNamespace) return "99";
|
|
4566
|
+
};
|
|
4567
|
+
return { resolve, sortText };
|
|
4737
4568
|
});
|
|
4569
|
+
var importProvidersCache = /* @__PURE__ */ new Map();
|
|
4570
|
+
var getOrMakeAutoImportProvider = fn("getOrMakeAutoImportProvider")(function* (sourceFile) {
|
|
4571
|
+
const autoImportProvider = importProvidersCache.get(sourceFile.fileName) || (yield* makeAutoImportProvider(sourceFile));
|
|
4572
|
+
importProvidersCache.set(sourceFile.fileName, autoImportProvider);
|
|
4573
|
+
return autoImportProvider;
|
|
4574
|
+
});
|
|
4575
|
+
var parseImportOnlyChanges = fn("parseImportOnlyChanges")(function* (sourceFile, changes) {
|
|
4576
|
+
const ts = yield* service(TypeScriptApi);
|
|
4577
|
+
const deletions = [];
|
|
4578
|
+
const imports = [];
|
|
4579
|
+
for (const change of changes) {
|
|
4580
|
+
if (change.newText.length === 0) {
|
|
4581
|
+
deletions.push(change);
|
|
4582
|
+
continue;
|
|
4583
|
+
}
|
|
4584
|
+
if (change.newText.trim().startsWith("import") && change.newText.trim().includes("from")) {
|
|
4585
|
+
try {
|
|
4586
|
+
const parsedImport = ts.createSourceFile("test.ts", change.newText, sourceFile.languageVersion, false);
|
|
4587
|
+
for (const statement of parsedImport.statements) {
|
|
4588
|
+
if (!ts.isImportDeclaration(statement)) return;
|
|
4589
|
+
const moduleSpecifier = statement.moduleSpecifier;
|
|
4590
|
+
if (!ts.isStringLiteral(moduleSpecifier)) return;
|
|
4591
|
+
const moduleName = moduleSpecifier.text;
|
|
4592
|
+
const importClause = statement.importClause;
|
|
4593
|
+
if (!importClause) return;
|
|
4594
|
+
const namedBindings = importClause.namedBindings;
|
|
4595
|
+
if (!namedBindings) return;
|
|
4596
|
+
if (ts.isNamedImports(namedBindings)) {
|
|
4597
|
+
for (const importSpecifier of namedBindings.elements) {
|
|
4598
|
+
if (!ts.isIdentifier(importSpecifier.name)) return;
|
|
4599
|
+
const exportName = importSpecifier.name.text;
|
|
4600
|
+
imports.push({ moduleName, exportName });
|
|
4601
|
+
continue;
|
|
4602
|
+
}
|
|
4603
|
+
} else if (ts.isNamespaceImport(namedBindings)) {
|
|
4604
|
+
imports.push({ moduleName, exportName: void 0 });
|
|
4605
|
+
continue;
|
|
4606
|
+
}
|
|
4607
|
+
}
|
|
4608
|
+
} catch (_) {
|
|
4609
|
+
return;
|
|
4610
|
+
}
|
|
4611
|
+
} else {
|
|
4612
|
+
const ancestorNodes = yield* getAncestorNodesInRange(sourceFile, {
|
|
4613
|
+
pos: change.span.start,
|
|
4614
|
+
end: change.span.start
|
|
4615
|
+
});
|
|
4616
|
+
const importNodes = ancestorNodes.filter((node) => ts.isImportDeclaration(node));
|
|
4617
|
+
const importNode = importNodes[0];
|
|
4618
|
+
if (!importNode) return;
|
|
4619
|
+
const moduleSpecifier = importNode.moduleSpecifier;
|
|
4620
|
+
if (!ts.isStringLiteral(moduleSpecifier)) return;
|
|
4621
|
+
const moduleName = moduleSpecifier.text;
|
|
4622
|
+
const exportName = change.newText.replace(/,/ig, "").trim();
|
|
4623
|
+
if (exportName.length === 0) return;
|
|
4624
|
+
imports.push({ moduleName, exportName });
|
|
4625
|
+
}
|
|
4626
|
+
}
|
|
4627
|
+
return { deletions, imports };
|
|
4628
|
+
});
|
|
4629
|
+
var addImport = (ts, sourceFile, changeTracker, preferences, effectAutoImport) => {
|
|
4630
|
+
let description = "";
|
|
4631
|
+
switch (effectAutoImport._tag) {
|
|
4632
|
+
case "NamespaceImport": {
|
|
4633
|
+
const importModule = effectAutoImport.moduleName || effectAutoImport.fileName;
|
|
4634
|
+
description = `Import * as ${effectAutoImport.name} from "${importModule}"`;
|
|
4635
|
+
ts.insertImports(
|
|
4636
|
+
changeTracker,
|
|
4637
|
+
sourceFile,
|
|
4638
|
+
ts.factory.createImportDeclaration(
|
|
4639
|
+
void 0,
|
|
4640
|
+
ts.factory.createImportClause(
|
|
4641
|
+
false,
|
|
4642
|
+
void 0,
|
|
4643
|
+
ts.factory.createNamespaceImport(ts.factory.createIdentifier(effectAutoImport.name))
|
|
4644
|
+
),
|
|
4645
|
+
ts.factory.createStringLiteral(importModule)
|
|
4646
|
+
),
|
|
4647
|
+
true,
|
|
4648
|
+
preferences || {}
|
|
4649
|
+
);
|
|
4650
|
+
break;
|
|
4651
|
+
}
|
|
4652
|
+
case "NamedImport": {
|
|
4653
|
+
const importModule = effectAutoImport.moduleName || effectAutoImport.fileName;
|
|
4654
|
+
description = `Import { ${effectAutoImport.name} } from "${importModule}"`;
|
|
4655
|
+
let foundImportDeclaration = false;
|
|
4656
|
+
for (const statement of sourceFile.statements) {
|
|
4657
|
+
if (ts.isImportDeclaration(statement)) {
|
|
4658
|
+
const moduleSpecifier = statement.moduleSpecifier;
|
|
4659
|
+
if (moduleSpecifier && ts.isStringLiteral(moduleSpecifier) && moduleSpecifier.text === importModule) {
|
|
4660
|
+
const importClause = statement.importClause;
|
|
4661
|
+
if (importClause && importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {
|
|
4662
|
+
const namedImports = importClause.namedBindings;
|
|
4663
|
+
const existingImportSpecifier = namedImports.elements.find(
|
|
4664
|
+
(element) => element.name.text === effectAutoImport.name
|
|
4665
|
+
);
|
|
4666
|
+
if (existingImportSpecifier) {
|
|
4667
|
+
foundImportDeclaration = true;
|
|
4668
|
+
break;
|
|
4669
|
+
}
|
|
4670
|
+
changeTracker.replaceNode(
|
|
4671
|
+
sourceFile,
|
|
4672
|
+
namedImports,
|
|
4673
|
+
ts.factory.createNamedImports(
|
|
4674
|
+
namedImports.elements.concat([
|
|
4675
|
+
ts.factory.createImportSpecifier(
|
|
4676
|
+
false,
|
|
4677
|
+
void 0,
|
|
4678
|
+
ts.factory.createIdentifier(effectAutoImport.name)
|
|
4679
|
+
)
|
|
4680
|
+
])
|
|
4681
|
+
)
|
|
4682
|
+
);
|
|
4683
|
+
foundImportDeclaration = true;
|
|
4684
|
+
break;
|
|
4685
|
+
}
|
|
4686
|
+
}
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
if (!foundImportDeclaration) {
|
|
4690
|
+
ts.insertImports(
|
|
4691
|
+
changeTracker,
|
|
4692
|
+
sourceFile,
|
|
4693
|
+
ts.factory.createImportDeclaration(
|
|
4694
|
+
void 0,
|
|
4695
|
+
ts.factory.createImportClause(
|
|
4696
|
+
false,
|
|
4697
|
+
void 0,
|
|
4698
|
+
ts.factory.createNamedImports(
|
|
4699
|
+
[
|
|
4700
|
+
ts.factory.createImportSpecifier(
|
|
4701
|
+
false,
|
|
4702
|
+
void 0,
|
|
4703
|
+
ts.factory.createIdentifier(effectAutoImport.name)
|
|
4704
|
+
)
|
|
4705
|
+
]
|
|
4706
|
+
)
|
|
4707
|
+
),
|
|
4708
|
+
ts.factory.createStringLiteral(importModule)
|
|
4709
|
+
),
|
|
4710
|
+
true,
|
|
4711
|
+
preferences || {}
|
|
4712
|
+
);
|
|
4713
|
+
}
|
|
4714
|
+
break;
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4717
|
+
return { description };
|
|
4718
|
+
};
|
|
4738
4719
|
|
|
4739
4720
|
// src/completions/middlewareAutoImports.ts
|
|
4740
|
-
var importProvidersCache = /* @__PURE__ */ new Map();
|
|
4741
4721
|
var appendEffectCompletionEntryData = fn("appendEffectCompletionEntryData")(
|
|
4742
4722
|
function* (_sourceFile, applicableCompletions) {
|
|
4743
4723
|
const languageServicePluginOptions = yield* service(LanguageServicePluginOptions);
|
|
@@ -4761,7 +4741,6 @@ var appendEffectCompletionEntryData = fn("appendEffectCompletionEntryData")(
|
|
|
4761
4741
|
);
|
|
4762
4742
|
var isAutoImportOnlyCodeActions = fn("isAutoImportOnlyCodeActions")(
|
|
4763
4743
|
function* (sourceFile, codeActions, exportName) {
|
|
4764
|
-
const ts = yield* service(TypeScriptApi);
|
|
4765
4744
|
if (!codeActions) return;
|
|
4766
4745
|
if (codeActions.length !== 1) return;
|
|
4767
4746
|
const action = codeActions[0];
|
|
@@ -4770,25 +4749,12 @@ var isAutoImportOnlyCodeActions = fn("isAutoImportOnlyCodeActions")(
|
|
|
4770
4749
|
const fileTextChanges = action.changes[0];
|
|
4771
4750
|
if (fileTextChanges.fileName !== sourceFile.fileName) return;
|
|
4772
4751
|
const textChanges = fileTextChanges.textChanges;
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
if (
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4779
|
-
}
|
|
4780
|
-
if (change.newText.indexOf(exportName) > -1) {
|
|
4781
|
-
const ancestorNodes = yield* getAncestorNodesInRange(sourceFile, {
|
|
4782
|
-
pos: change.span.start,
|
|
4783
|
-
end: change.span.start
|
|
4784
|
-
});
|
|
4785
|
-
const importNodes = ancestorNodes.filter((node) => ts.isImportDeclaration(node));
|
|
4786
|
-
if (importNodes.length > 0) {
|
|
4787
|
-
return {
|
|
4788
|
-
type: "update"
|
|
4789
|
-
};
|
|
4790
|
-
}
|
|
4791
|
-
}
|
|
4752
|
+
const parsedImportChanges = yield* parseImportOnlyChanges(sourceFile, textChanges);
|
|
4753
|
+
if (!parsedImportChanges) return;
|
|
4754
|
+
if (parsedImportChanges.deletions.length !== 0) return;
|
|
4755
|
+
if (parsedImportChanges.imports.length !== 1) return;
|
|
4756
|
+
if (parsedImportChanges.imports[0].exportName !== exportName) return;
|
|
4757
|
+
return parsedImportChanges.imports[0];
|
|
4792
4758
|
}
|
|
4793
4759
|
);
|
|
4794
4760
|
var addImportCodeAction = fn("getImportFromNamespaceCodeActions")(function* (formatOptions, preferences, languageServiceHost, sourceFile, effectReplaceSpan, effectAutoImport) {
|
|
@@ -4812,92 +4778,13 @@ var addImportCodeAction = fn("getImportFromNamespaceCodeActions")(function* (for
|
|
|
4812
4778
|
effectAutoImport.introducedPrefix + "."
|
|
4813
4779
|
);
|
|
4814
4780
|
}
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
ts.factory.createImportDeclaration(
|
|
4823
|
-
void 0,
|
|
4824
|
-
ts.factory.createImportClause(
|
|
4825
|
-
false,
|
|
4826
|
-
void 0,
|
|
4827
|
-
ts.factory.createNamespaceImport(ts.factory.createIdentifier(effectAutoImport.name))
|
|
4828
|
-
),
|
|
4829
|
-
ts.factory.createStringLiteral(importModule)
|
|
4830
|
-
),
|
|
4831
|
-
true,
|
|
4832
|
-
preferences || {}
|
|
4833
|
-
);
|
|
4834
|
-
break;
|
|
4835
|
-
}
|
|
4836
|
-
case "NamedImport": {
|
|
4837
|
-
const importModule = effectAutoImport.moduleName || effectAutoImport.fileName;
|
|
4838
|
-
description = `Import { ${effectAutoImport.name} } from "${importModule}"`;
|
|
4839
|
-
let foundImportDeclaration = false;
|
|
4840
|
-
for (const statement of sourceFile.statements) {
|
|
4841
|
-
if (ts.isImportDeclaration(statement)) {
|
|
4842
|
-
const moduleSpecifier = statement.moduleSpecifier;
|
|
4843
|
-
if (moduleSpecifier && ts.isStringLiteral(moduleSpecifier) && moduleSpecifier.text === importModule) {
|
|
4844
|
-
const importClause = statement.importClause;
|
|
4845
|
-
if (importClause && importClause.namedBindings && ts.isNamedImports(importClause.namedBindings)) {
|
|
4846
|
-
const namedImports = importClause.namedBindings;
|
|
4847
|
-
const existingImportSpecifier = namedImports.elements.find(
|
|
4848
|
-
(element) => element.name.text === effectAutoImport.name
|
|
4849
|
-
);
|
|
4850
|
-
if (existingImportSpecifier) {
|
|
4851
|
-
foundImportDeclaration = true;
|
|
4852
|
-
break;
|
|
4853
|
-
}
|
|
4854
|
-
changeTracker.replaceNode(
|
|
4855
|
-
sourceFile,
|
|
4856
|
-
namedImports,
|
|
4857
|
-
ts.factory.createNamedImports(
|
|
4858
|
-
namedImports.elements.concat([
|
|
4859
|
-
ts.factory.createImportSpecifier(
|
|
4860
|
-
false,
|
|
4861
|
-
void 0,
|
|
4862
|
-
ts.factory.createIdentifier(effectAutoImport.name)
|
|
4863
|
-
)
|
|
4864
|
-
])
|
|
4865
|
-
)
|
|
4866
|
-
);
|
|
4867
|
-
foundImportDeclaration = true;
|
|
4868
|
-
break;
|
|
4869
|
-
}
|
|
4870
|
-
}
|
|
4871
|
-
}
|
|
4872
|
-
}
|
|
4873
|
-
if (!foundImportDeclaration) {
|
|
4874
|
-
ts.insertImports(
|
|
4875
|
-
changeTracker,
|
|
4876
|
-
sourceFile,
|
|
4877
|
-
ts.factory.createImportDeclaration(
|
|
4878
|
-
void 0,
|
|
4879
|
-
ts.factory.createImportClause(
|
|
4880
|
-
false,
|
|
4881
|
-
void 0,
|
|
4882
|
-
ts.factory.createNamedImports(
|
|
4883
|
-
[
|
|
4884
|
-
ts.factory.createImportSpecifier(
|
|
4885
|
-
false,
|
|
4886
|
-
void 0,
|
|
4887
|
-
ts.factory.createIdentifier(effectAutoImport.name)
|
|
4888
|
-
)
|
|
4889
|
-
]
|
|
4890
|
-
)
|
|
4891
|
-
),
|
|
4892
|
-
ts.factory.createStringLiteral(importModule)
|
|
4893
|
-
),
|
|
4894
|
-
true,
|
|
4895
|
-
preferences || {}
|
|
4896
|
-
);
|
|
4897
|
-
}
|
|
4898
|
-
break;
|
|
4899
|
-
}
|
|
4900
|
-
}
|
|
4781
|
+
description = addImport(
|
|
4782
|
+
ts,
|
|
4783
|
+
sourceFile,
|
|
4784
|
+
changeTracker,
|
|
4785
|
+
preferences,
|
|
4786
|
+
effectAutoImport
|
|
4787
|
+
).description;
|
|
4901
4788
|
}
|
|
4902
4789
|
);
|
|
4903
4790
|
return [
|
|
@@ -4925,9 +4812,8 @@ var postprocessCompletionEntryDetails = fn("postprocessCompletionEntryDetails")(
|
|
|
4925
4812
|
exportName
|
|
4926
4813
|
);
|
|
4927
4814
|
if (!result) return applicableCompletionEntryDetails;
|
|
4928
|
-
const
|
|
4929
|
-
|
|
4930
|
-
const effectAutoImport = packagesMetadata(fileName, exportName);
|
|
4815
|
+
const autoImportProvider = yield* getOrMakeAutoImportProvider(sourceFile);
|
|
4816
|
+
const effectAutoImport = autoImportProvider.resolve(fileName, exportName);
|
|
4931
4817
|
if (!effectAutoImport) return applicableCompletionEntryDetails;
|
|
4932
4818
|
const codeActions = yield* addImportCodeAction(
|
|
4933
4819
|
formatOptions,
|
|
@@ -4944,6 +4830,74 @@ var postprocessCompletionEntryDetails = fn("postprocessCompletionEntryDetails")(
|
|
|
4944
4830
|
}
|
|
4945
4831
|
);
|
|
4946
4832
|
|
|
4833
|
+
// src/diagnostics/middlewareAutoImportQuickfixes.ts
|
|
4834
|
+
var middlewareAutoImportQuickfixes = fn("middlewareAutoImportQuickfixes")(function* (sourceFile, languageServiceHost, formatOptions, preferences, codeFixes) {
|
|
4835
|
+
const ts = yield* service(TypeScriptApi);
|
|
4836
|
+
const program = yield* service(TypeScriptProgram);
|
|
4837
|
+
const autoImportProvider = yield* getOrMakeAutoImportProvider(sourceFile);
|
|
4838
|
+
const changedCodeFixes = [];
|
|
4839
|
+
const createImportAllChanges = (imports) => gen(function* () {
|
|
4840
|
+
const newImports = [];
|
|
4841
|
+
for (const importToAdd of imports) {
|
|
4842
|
+
if (!importToAdd.exportName) return;
|
|
4843
|
+
const fileName = ts.resolveModuleName(
|
|
4844
|
+
importToAdd.moduleName,
|
|
4845
|
+
sourceFile.fileName,
|
|
4846
|
+
program.getCompilerOptions(),
|
|
4847
|
+
program
|
|
4848
|
+
);
|
|
4849
|
+
if (!fileName.resolvedModule) return;
|
|
4850
|
+
const importKind = autoImportProvider.resolve(fileName.resolvedModule.resolvedFileName, importToAdd.exportName);
|
|
4851
|
+
if (!importKind) return;
|
|
4852
|
+
if (importKind.introducedPrefix) return;
|
|
4853
|
+
newImports.push(importKind);
|
|
4854
|
+
}
|
|
4855
|
+
const formatContext = ts.formatting.getFormatContext(
|
|
4856
|
+
formatOptions,
|
|
4857
|
+
languageServiceHost
|
|
4858
|
+
);
|
|
4859
|
+
const edits = ts.textChanges.ChangeTracker.with(
|
|
4860
|
+
{
|
|
4861
|
+
formatContext,
|
|
4862
|
+
host: languageServiceHost,
|
|
4863
|
+
preferences: preferences || {}
|
|
4864
|
+
},
|
|
4865
|
+
(changeTracker) => newImports.forEach((_) => addImport(ts, sourceFile, changeTracker, preferences, _))
|
|
4866
|
+
);
|
|
4867
|
+
return edits;
|
|
4868
|
+
});
|
|
4869
|
+
for (const codeFix of codeFixes) {
|
|
4870
|
+
const textFileChanges = codeFix.changes;
|
|
4871
|
+
if (textFileChanges.length !== 1) {
|
|
4872
|
+
changedCodeFixes.push(codeFix);
|
|
4873
|
+
continue;
|
|
4874
|
+
}
|
|
4875
|
+
if (textFileChanges[0].fileName !== sourceFile.fileName) {
|
|
4876
|
+
changedCodeFixes.push(codeFix);
|
|
4877
|
+
continue;
|
|
4878
|
+
}
|
|
4879
|
+
const parsedChanges = yield* parseImportOnlyChanges(sourceFile, textFileChanges[0].textChanges);
|
|
4880
|
+
if (!parsedChanges) {
|
|
4881
|
+
changedCodeFixes.push(codeFix);
|
|
4882
|
+
continue;
|
|
4883
|
+
}
|
|
4884
|
+
if (parsedChanges.deletions.length !== 0) {
|
|
4885
|
+
changedCodeFixes.push(codeFix);
|
|
4886
|
+
continue;
|
|
4887
|
+
}
|
|
4888
|
+
const changes = yield* pipe(
|
|
4889
|
+
createImportAllChanges(parsedChanges.imports),
|
|
4890
|
+
orElse2(() => succeed(codeFix.changes))
|
|
4891
|
+
);
|
|
4892
|
+
if (changes) {
|
|
4893
|
+
changedCodeFixes.push({ ...codeFix, changes });
|
|
4894
|
+
} else {
|
|
4895
|
+
changedCodeFixes.push(codeFix);
|
|
4896
|
+
}
|
|
4897
|
+
}
|
|
4898
|
+
return changedCodeFixes;
|
|
4899
|
+
});
|
|
4900
|
+
|
|
4947
4901
|
// src/goto/effectRpcDefinition.ts
|
|
4948
4902
|
function effectRpcDefinition(applicableGotoDefinition, sourceFile, position) {
|
|
4949
4903
|
return gen(function* () {
|
|
@@ -5167,6 +5121,41 @@ function effectTypeArgs(sourceFile, position, quickInfo2) {
|
|
|
5167
5121
|
);
|
|
5168
5122
|
}
|
|
5169
5123
|
|
|
5124
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/encoding/common.js
|
|
5125
|
+
var encoder = /* @__PURE__ */ new TextEncoder();
|
|
5126
|
+
|
|
5127
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/encoding/base64.js
|
|
5128
|
+
var encode = (bytes) => {
|
|
5129
|
+
const length = bytes.length;
|
|
5130
|
+
let result = "";
|
|
5131
|
+
let i;
|
|
5132
|
+
for (i = 2; i < length; i += 3) {
|
|
5133
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
5134
|
+
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
5135
|
+
result += base64abc[(bytes[i - 1] & 15) << 2 | bytes[i] >> 6];
|
|
5136
|
+
result += base64abc[bytes[i] & 63];
|
|
5137
|
+
}
|
|
5138
|
+
if (i === length + 1) {
|
|
5139
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
5140
|
+
result += base64abc[(bytes[i - 2] & 3) << 4];
|
|
5141
|
+
result += "==";
|
|
5142
|
+
}
|
|
5143
|
+
if (i === length) {
|
|
5144
|
+
result += base64abc[bytes[i - 2] >> 2];
|
|
5145
|
+
result += base64abc[(bytes[i - 2] & 3) << 4 | bytes[i - 1] >> 4];
|
|
5146
|
+
result += base64abc[(bytes[i - 1] & 15) << 2];
|
|
5147
|
+
result += "=";
|
|
5148
|
+
}
|
|
5149
|
+
return result;
|
|
5150
|
+
};
|
|
5151
|
+
var base64abc = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/"];
|
|
5152
|
+
|
|
5153
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/internal/encoding/base64Url.js
|
|
5154
|
+
var encode2 = (data) => encode(data).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
5155
|
+
|
|
5156
|
+
// node_modules/.pnpm/effect@3.17.1/node_modules/effect/dist/esm/Encoding.js
|
|
5157
|
+
var encodeBase64Url = (input) => typeof input === "string" ? encode2(encoder.encode(input)) : encode2(input);
|
|
5158
|
+
|
|
5170
5159
|
// node_modules/.pnpm/pako@2.1.0/node_modules/pako/dist/pako.esm.mjs
|
|
5171
5160
|
var Z_FIXED$1 = 4;
|
|
5172
5161
|
var Z_BINARY = 0;
|
|
@@ -9387,7 +9376,7 @@ function processLayerGraphNode(ctx, node, pipedInGraphNode) {
|
|
|
9387
9376
|
const maybeLayer = yield* option(typeParser.layerType(type, node));
|
|
9388
9377
|
if (isSome2(maybeLayer)) {
|
|
9389
9378
|
const argNodes = yield* option(
|
|
9390
|
-
|
|
9379
|
+
all(...node.arguments.map((_) => processLayerGraphNode(ctx, _, void 0)))
|
|
9391
9380
|
);
|
|
9392
9381
|
if (isSome2(argNodes) && argNodes.value.length === node.arguments.length) {
|
|
9393
9382
|
const { allIndexes: outTypes } = yield* appendToUniqueTypesMap(
|
|
@@ -9431,7 +9420,7 @@ function processLayerGraphNode(ctx, node, pipedInGraphNode) {
|
|
|
9431
9420
|
);
|
|
9432
9421
|
if (ts.isCallExpression(node)) {
|
|
9433
9422
|
const argNodes = yield* option(
|
|
9434
|
-
|
|
9423
|
+
all(...node.arguments.map((_) => processLayerGraphNode(ctx, _, void 0)))
|
|
9435
9424
|
);
|
|
9436
9425
|
if (isSome2(argNodes) && argNodes.value.length === node.arguments.length) {
|
|
9437
9426
|
return new GraphNodeCompoundTransform(
|
|
@@ -9561,7 +9550,7 @@ function processNodeMermaid(graph, ctx, ctxL) {
|
|
|
9561
9550
|
return subgraphDefs;
|
|
9562
9551
|
}
|
|
9563
9552
|
case "GraphNodeCompoundTransform": {
|
|
9564
|
-
const childs = flatten(yield*
|
|
9553
|
+
const childs = flatten(yield* all(...graph.args.map((_) => processNodeMermaid(_, ctx, ctxL))));
|
|
9565
9554
|
let currentEdges = [];
|
|
9566
9555
|
const connectedNodes = /* @__PURE__ */ new Set();
|
|
9567
9556
|
for (const requiredServiceKey of graph.rin) {
|
|
@@ -10346,7 +10335,7 @@ var pipeableToDatafirst = createRefactor({
|
|
|
10346
10335
|
for (let i = 0; i < callSignatures.length; i++) {
|
|
10347
10336
|
const callSignature = callSignatures[i];
|
|
10348
10337
|
if (callSignature.parameters.length === node2.arguments.length + 1) {
|
|
10349
|
-
return
|
|
10338
|
+
return some2(
|
|
10350
10339
|
ts.factory.createCallExpression(
|
|
10351
10340
|
node2.expression,
|
|
10352
10341
|
[],
|
|
@@ -10388,7 +10377,7 @@ var pipeableToDatafirst = createRefactor({
|
|
|
10388
10377
|
}
|
|
10389
10378
|
}
|
|
10390
10379
|
}
|
|
10391
|
-
return didSomething ?
|
|
10380
|
+
return didSomething ? some2([node2, newNode2]) : none2();
|
|
10392
10381
|
}),
|
|
10393
10382
|
filter(isSome2),
|
|
10394
10383
|
map3((_) => _.value),
|
|
@@ -10716,17 +10705,17 @@ var makeSchemaGenContext = fn("SchemaGen.makeSchemaGenContext")(function* (sourc
|
|
|
10716
10705
|
case "Pick":
|
|
10717
10706
|
case "Omit":
|
|
10718
10707
|
case "Record":
|
|
10719
|
-
return
|
|
10708
|
+
return some2(name.text);
|
|
10720
10709
|
case "ReadonlyArray":
|
|
10721
10710
|
case "Array":
|
|
10722
|
-
return
|
|
10711
|
+
return some2("Array");
|
|
10723
10712
|
}
|
|
10724
10713
|
return none2();
|
|
10725
10714
|
}
|
|
10726
10715
|
if (!ts.isIdentifier(name.left)) return none2();
|
|
10727
10716
|
for (const moduleName in moduleToImportedName) {
|
|
10728
10717
|
if (name.left.text === moduleToImportedName[moduleName] && name.right.text === moduleName) {
|
|
10729
|
-
return
|
|
10718
|
+
return some2(moduleName);
|
|
10730
10719
|
}
|
|
10731
10720
|
}
|
|
10732
10721
|
return none2();
|
|
@@ -10765,7 +10754,7 @@ var parseAllLiterals = fn(
|
|
|
10765
10754
|
}
|
|
10766
10755
|
}
|
|
10767
10756
|
if (ts.isUnionTypeNode(node)) {
|
|
10768
|
-
return flatten(yield*
|
|
10757
|
+
return flatten(yield* all(...node.types.map((_) => parseAllLiterals(_))));
|
|
10769
10758
|
}
|
|
10770
10759
|
if (ts.isParenthesizedTypeNode(node)) {
|
|
10771
10760
|
return yield* parseAllLiterals(node.type);
|
|
@@ -10812,11 +10801,11 @@ var processNode = (node, isVirtualTypeNode) => gen(function* () {
|
|
|
10812
10801
|
if (ts.isUnionTypeNode(node)) {
|
|
10813
10802
|
const allLiterals = yield* option(parseAllLiterals(node));
|
|
10814
10803
|
if (isSome2(allLiterals)) return createApiCall("Literal", allLiterals.value);
|
|
10815
|
-
const members = yield*
|
|
10804
|
+
const members = yield* all(...node.types.map((_) => processNode(_, isVirtualTypeNode)));
|
|
10816
10805
|
return createApiCall("Union", members);
|
|
10817
10806
|
}
|
|
10818
10807
|
if (ts.isIntersectionTypeNode(node)) {
|
|
10819
|
-
const [firstSchema, ...otherSchemas] = yield*
|
|
10808
|
+
const [firstSchema, ...otherSchemas] = yield* all(
|
|
10820
10809
|
...node.types.map((_) => processNode(_, isVirtualTypeNode))
|
|
10821
10810
|
);
|
|
10822
10811
|
if (otherSchemas.length === 0) return firstSchema;
|
|
@@ -10872,13 +10861,13 @@ var processNode = (node, isVirtualTypeNode) => gen(function* () {
|
|
|
10872
10861
|
case "Option":
|
|
10873
10862
|
case "Chunk":
|
|
10874
10863
|
case "Array": {
|
|
10875
|
-
const elements = yield*
|
|
10864
|
+
const elements = yield* all(
|
|
10876
10865
|
...node.typeArguments ? node.typeArguments.map((_) => processNode(_, isVirtualTypeNode)) : []
|
|
10877
10866
|
);
|
|
10878
10867
|
return createApiCall(parsedName.value, elements);
|
|
10879
10868
|
}
|
|
10880
10869
|
case "Record": {
|
|
10881
|
-
const elements = yield*
|
|
10870
|
+
const elements = yield* all(
|
|
10882
10871
|
...node.typeArguments ? node.typeArguments.map((_) => processNode(_, isVirtualTypeNode)) : []
|
|
10883
10872
|
);
|
|
10884
10873
|
if (elements.length >= 2) {
|
|
@@ -10892,7 +10881,7 @@ var processNode = (node, isVirtualTypeNode) => gen(function* () {
|
|
|
10892
10881
|
return createUnsupportedNodeComment(ts, sourceFile, node);
|
|
10893
10882
|
}
|
|
10894
10883
|
case "Either": {
|
|
10895
|
-
const elements = yield*
|
|
10884
|
+
const elements = yield* all(
|
|
10896
10885
|
...node.typeArguments ? node.typeArguments.map((_) => processNode(_, isVirtualTypeNode)) : []
|
|
10897
10886
|
);
|
|
10898
10887
|
if (elements.length >= 2) {
|
|
@@ -11599,45 +11588,60 @@ var init = (modules) => {
|
|
|
11599
11588
|
preferences,
|
|
11600
11589
|
...args2
|
|
11601
11590
|
);
|
|
11602
|
-
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
|
|
11614
|
-
info.languageServiceHost
|
|
11615
|
-
);
|
|
11616
|
-
for (const applicableFix of applicableFixes) {
|
|
11617
|
-
const changes = modules.typescript.textChanges.ChangeTracker.with(
|
|
11618
|
-
{
|
|
11619
|
-
formatContext,
|
|
11620
|
-
host: info.languageServiceHost,
|
|
11621
|
-
preferences: preferences || {}
|
|
11622
|
-
},
|
|
11623
|
-
(changeTracker) => pipe(
|
|
11624
|
-
applicableFix.apply,
|
|
11625
|
-
provideService(ChangeTracker, changeTracker),
|
|
11626
|
-
run
|
|
11627
|
-
)
|
|
11591
|
+
const program = languageService.getProgram();
|
|
11592
|
+
if (languageServicePluginOptions.diagnostics && program) {
|
|
11593
|
+
const sourceFile = program.getSourceFile(fileName);
|
|
11594
|
+
if (sourceFile) {
|
|
11595
|
+
return pipe(
|
|
11596
|
+
sync(() => {
|
|
11597
|
+
const effectCodeFixes = [];
|
|
11598
|
+
if (!effectCodeFixesForFile.has(fileName)) {
|
|
11599
|
+
runDiagnosticsAndCacheCodeFixes(fileName);
|
|
11600
|
+
}
|
|
11601
|
+
const applicableFixes = (effectCodeFixesForFile.get(fileName) || []).filter(
|
|
11602
|
+
(_) => _.start === start && _.end === end && errorCodes.indexOf(_.code) > -1
|
|
11628
11603
|
);
|
|
11629
|
-
|
|
11630
|
-
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11604
|
+
const formatContext = modules.typescript.formatting.getFormatContext(
|
|
11605
|
+
formatOptions,
|
|
11606
|
+
info.languageServiceHost
|
|
11607
|
+
);
|
|
11608
|
+
for (const applicableFix of applicableFixes) {
|
|
11609
|
+
const changes = modules.typescript.textChanges.ChangeTracker.with(
|
|
11610
|
+
{
|
|
11611
|
+
formatContext,
|
|
11612
|
+
host: info.languageServiceHost,
|
|
11613
|
+
preferences: preferences || {}
|
|
11614
|
+
},
|
|
11615
|
+
(changeTracker) => pipe(
|
|
11616
|
+
applicableFix.apply,
|
|
11617
|
+
provideService(ChangeTracker, changeTracker),
|
|
11618
|
+
run
|
|
11619
|
+
)
|
|
11620
|
+
);
|
|
11621
|
+
effectCodeFixes.push({
|
|
11622
|
+
fixName: applicableFix.fixName,
|
|
11623
|
+
description: applicableFix.description,
|
|
11624
|
+
changes
|
|
11625
|
+
});
|
|
11626
|
+
}
|
|
11627
|
+
return effectCodeFixes;
|
|
11628
|
+
}),
|
|
11629
|
+
flatMap2(
|
|
11630
|
+
(effectCodeFixes) => pipe(
|
|
11631
|
+
middlewareAutoImportQuickfixes(
|
|
11632
|
+
sourceFile,
|
|
11633
|
+
info.languageServiceHost,
|
|
11634
|
+
formatOptions,
|
|
11635
|
+
preferences,
|
|
11636
|
+
applicableCodeFixes
|
|
11637
|
+
),
|
|
11638
|
+
map4((modifiedCodeFixes) => effectCodeFixes.concat(modifiedCodeFixes))
|
|
11639
|
+
)
|
|
11640
|
+
),
|
|
11641
|
+
runNano(program),
|
|
11642
|
+
getOrElse(() => applicableCodeFixes)
|
|
11643
|
+
);
|
|
11644
|
+
}
|
|
11641
11645
|
}
|
|
11642
11646
|
return applicableCodeFixes;
|
|
11643
11647
|
};
|