| load("@build_bazel_rules_nodejs//:index.bzl", "js_library") |
| load("@npm//@bazel/typescript:index.bzl", "ts_project") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| ts_project( |
| name = "compiled", |
| srcs = glob(["*.ts"]), |
| declaration = True, |
| extends = "//:tsconfig.json", |
| # Needed on windows so that an explicit files[] list is passed to tsc |
| # This avoids tsc adding index.test.ts to the program and emitting it |
| tsconfig = { |
| "compilerOptions": { |
| "declaration": True, |
| }, |
| }, |
| ) |
| |
| js_library( |
| name = "src", |
| package_name = "lib", |
| deps = ["compiled"], |
| ) |