@effect/language-service
Advanced tools
Comparing version 0.0.14 to 0.0.15
@@ -32,3 +32,4 @@ "use strict"; | ||
name: refactor.name, | ||
description: _.description | ||
description: _.description, | ||
kind: _.kind | ||
}] | ||
@@ -35,0 +36,0 @@ })))), _ => _.reduce((arr, maybeRefactor) => arr.concat(O.isSome(maybeRefactor) ? [maybeRefactor.value] : []), []))); |
{ | ||
"name": "@effect/language-service", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -18,2 +18,3 @@ "use strict"; | ||
apply: ts => (sourceFile, textRange) => (0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(ts.isFunctionDeclaration), Ch.filter(node => !!node.body), Ch.filter(node => !!(ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Async)), Ch.head, O.map(node => ({ | ||
kind: "refactor.rewrite.effect.asyncAwaitToGen", | ||
description: "Rewrite to Effect.gen", | ||
@@ -20,0 +21,0 @@ apply: changeTracker => { |
@@ -18,2 +18,3 @@ "use strict"; | ||
apply: ts => (sourceFile, textRange) => (0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(ts.isFunctionDeclaration), Ch.filter(node => !!node.body), Ch.filter(node => !!(ts.getCombinedModifierFlags(node) & ts.ModifierFlags.Async)), Ch.head, O.map(node => ({ | ||
kind: "refactor.rewrite.effect.asyncAwaitToGenTryPromise", | ||
description: "Rewrite to Effect.gen with failures", | ||
@@ -20,0 +21,0 @@ apply: changeTracker => { |
@@ -10,2 +10,3 @@ import type * as AST from "@effect/language-service/utils/AST"; | ||
export interface ApplicableRefactorDefinition { | ||
kind: string; | ||
description: string; | ||
@@ -12,0 +13,0 @@ apply: (changeTracker: ts.textChanges.ChangeTracker) => void; |
@@ -18,2 +18,3 @@ "use strict"; | ||
apply: ts => (sourceFile, textRange) => (0, _Function.pipe)((0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(ts.isFunctionDeclaration)), Ch.concat((0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(ts.isMethodDeclaration))), Ch.filter(node => !!node.body), Ch.filter(node => !!node.name && AST.isNodeInRange(textRange)(node.name)), Ch.head, O.map(node => ({ | ||
kind: "refactor.rewrite.effect.functionToArrow", | ||
description: "Convert to arrow", | ||
@@ -20,0 +21,0 @@ apply: changeTracker => { |
@@ -30,2 +30,3 @@ "use strict"; | ||
return (0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(isConvertibleDeclaration), Ch.head, O.map(node => ({ | ||
kind: "refactor.rewrite.effect.toggleReturnTypeAnnotation", | ||
description: "Toggle return type annotation", | ||
@@ -32,0 +33,0 @@ apply: changeTracker => { |
@@ -18,2 +18,3 @@ "use strict"; | ||
apply: (ts, program) => (sourceFile, textRange) => (0, _Function.pipe)(AST.getNodesContainingRange(ts)(sourceFile, textRange), Ch.filter(ts.isVariableDeclaration), Ch.filter(node => AST.isNodeInRange(textRange)(node.name)), Ch.filter(node => !!node.initializer), Ch.head, O.map(node => ({ | ||
kind: "refactor.rewrite.effect.toggleTypeAnnotation", | ||
description: "Toggle type annotation", | ||
@@ -20,0 +21,0 @@ apply: changeTracker => { |
@@ -17,2 +17,3 @@ "use strict"; | ||
return O.some({ | ||
kind: "refactor.rewrite.effect.wrapWithPipe", | ||
description: `Wrap with pipe(...)`, | ||
@@ -19,0 +20,0 @@ apply: changeTracker => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
200344
1654