Skip to content

Commit 11e4411

Browse files
committed
fix(bazel): extract types from ts_project targets instead of ts_library
Look for types and transitive types in JsInfo instead of DeclarationInfo providers.
1 parent 1ac037c commit 11e4411

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bazel/extract_types.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
load("@build_bazel_rules_nodejs//:providers.bzl", "DeclarationInfo")
1+
load("@aspect_rules_js//js:providers.bzl", "JsInfo")
22

33
def _extract_types_impl(ctx):
44
"""Implementation of the `extract_types` rule."""
55
depsets = []
66

77
for dep in ctx.attr.deps:
8-
if DeclarationInfo in dep:
9-
depsets.append(dep[DeclarationInfo].transitive_declarations)
8+
if JsInfo in dep:
9+
depsets.append(dep[JsInfo].transitive_types)
10+
depsets.append(dep[JsInfo].types)
1011

1112
types = depset(transitive = depsets)
1213

0 commit comments

Comments
 (0)