mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
![]() Allows some type errors to surface that were only being picked up on Windows. The root cause seems to be TypeScript picking up other .d.ts/.tsx files in the same folder, which it can only do on Windows due to the lack of sandboxing. On other platforms the other files can't be found, and tsc changes the types into 'any'. I experimented with modifying rules_svelte to build all .tsx files up front and convert them to .d.ts in bulk, but ran into further issues with conflicting types, as the typings in svelte2tsx seem to conflict with Svelte's built-in types, and passing the dependencies in explicitly causes them to be checked even though --skipLibCheck is passed in to TypeScript. Forcing sandboxing off is an ugly hack, and our best approach moving forward may be to switch to ts_project for the Svelte generation - it does appear that rules_nodejs favours it over ts_library anyway. |
||
---|---|---|
.. | ||
congrats | ||
graphs | ||
lib | ||
patches | ||
sass | ||
vendor | ||
.eslintrc.js | ||
.gitignore | ||
.prettierignore | ||
.prettierrc | ||
BUILD.bazel | ||
copy.bzl | ||
eslint.bzl | ||
format.sh | ||
jquery.bzl | ||
licenses.json | ||
mathjax.bzl | ||
package.json | ||
prettier.bzl | ||
README.md | ||
rollup.config.js | ||
svelte.bzl | ||
tsconfig.json | ||
update.sh | ||
yarn.lock |
Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.
To add a new dev dependency, use something like:
bazel run @nodejs//:yarn add @rollup/plugin-alias -- -D