fix(build): Fix spurious tsc errors cause by tsc version bump

* Bump @types/inquirer to version that resolves type errors.
* Add types: [] directive to tsconfig.json's compilerOptions
  to prevent future issues of this kind.

See https://github.com/google/blockly/pull/6564#issuecomment-1291885382
for details.
This commit is contained in:
Christopher Allen
2022-10-26 12:26:46 +01:00
parent 82e5a23216
commit db70be2c96
2 changed files with 21 additions and 10 deletions

View File

@@ -26,5 +26,18 @@
// cannot leave it enabled.
// See: https://github.com/microsoft/TypeScript/issues/49974
// "importsNotUsedAsValues": "error"
// tsc has a clever and usually helpful feature ("@types support")
// wherein it automatically ingests any type definitions found in
// node_modues/@types/**/*.d.ts. This lets you tell it about the
// types for your favourite framework or library just by
// installing the relevant @types/<whatever> npm package.
//
// We don't (as of this writing) use this feature, and it causes a
// problem when one of our dependencies pulls in such a package
// which turns out to have syntax errors (see e.g. discussion on
// PR #6564: https://github.com/google/blockly/pull/6564), so
// disable it except for the explicitly-specified types.
"types": [],
}
}