refactor(language-service): move TS utils to separate file (#36984)
This commit refactors TS-only utility functions to a separate file so that they could be shared with Ivy language service. A separate ts_library rule is created so that there is no dependency on `compiler` and `compiler-cli` to make the compilation fast and light-weight. The method `getPropertyAssignmentFromValue` is modified slightly to improve the ergonomics of the function. PR Close #36984
This commit is contained in:

committed by
Misko Hevery

parent
7eb1a58b26
commit
40025f55ad
@ -9,8 +9,12 @@ ts_library(
|
||||
"*.ts",
|
||||
"src/**/*.ts",
|
||||
],
|
||||
exclude = [
|
||||
"src/ts_utils.ts",
|
||||
],
|
||||
),
|
||||
deps = [
|
||||
":ts_utils",
|
||||
"//packages:types",
|
||||
"//packages/compiler",
|
||||
"//packages/compiler-cli",
|
||||
@ -20,6 +24,14 @@ ts_library(
|
||||
],
|
||||
)
|
||||
|
||||
ts_library(
|
||||
name = "ts_utils",
|
||||
srcs = ["src/ts_utils.ts"],
|
||||
deps = [
|
||||
"@npm//typescript",
|
||||
],
|
||||
)
|
||||
|
||||
pkg_npm(
|
||||
name = "npm_package",
|
||||
srcs = ["package.json"],
|
||||
|
Reference in New Issue
Block a user