diff --git a/qt/aqt/data/web/js/BUILD.bazel b/qt/aqt/data/web/js/BUILD.bazel index 4b3ca41a7..aff15328e 100644 --- a/qt/aqt/data/web/js/BUILD.bazel +++ b/qt/aqt/data/web/js/BUILD.bazel @@ -1,22 +1,21 @@ -load("@npm//@bazel/typescript:index.bzl", "ts_library") +load("@build_bazel_rules_nodejs//:index.bzl", "js_library") +load("//ts:typescript.bzl", "typescript") load("//ts:copy.bzl", "copy_files_into_group") load("//ts:prettier.bzl", "prettier_test") load("//ts:eslint.bzl", "eslint_test") -ts_library( +js_library( name = "pycmd", srcs = ["pycmd.d.ts"], - tsconfig = "tsconfig.json", visibility = ["//qt/aqt/data/web/js:__subpackages__"], ) -ts_library( +typescript( name = "aqt", srcs = glob( ["*.ts"], exclude = ["*.d.ts"], ), - tsconfig = "tsconfig.json", deps = [ "pycmd", "@npm//@types/jquery", @@ -24,12 +23,6 @@ ts_library( ], ) -filegroup( - name = "aqt_es5", - srcs = ["aqt"], - output_group = "es5_sources", -) - copy_files_into_group( name = "editor", srcs = [ @@ -49,7 +42,7 @@ copy_files_into_group( filegroup( name = "js", srcs = [ - "aqt_es5", + "aqt", "editor", "mathjax.js", "reviewer", diff --git a/qt/aqt/data/web/js/tsconfig.json b/qt/aqt/data/web/js/tsconfig.json index 9deb06f21..9ca9efa2e 100644 --- a/qt/aqt/data/web/js/tsconfig.json +++ b/qt/aqt/data/web/js/tsconfig.json @@ -1,11 +1,16 @@ { + "extends": "../../../../../ts/tsconfig.json", + "include": ["*.ts"], + "references": [], "compilerOptions": { "target": "es6", "module": "commonjs", "lib": ["es2019", "dom", "dom.iterable"], + "types": ["jquery", "jqueryui"], "strict": true, "noImplicitAny": false, "strictNullChecks": false, + "strictPropertyInitialization": false, "noImplicitThis": false, "esModuleInterop": true }