d.ts file’s declarations will be visible in this project If the referenced project produces an outFile, the output file.Importing modules from a referenced project will instead load its output declaration file (.When you reference a project, new things happen: The path property of each reference can point to a directory containing a tsconfig.json file, or to the config file itself (which may have any name). It’s an array of objects that specifies projects to reference: Tsconfig.json files have a new top-level property, references. Project references can solve all of these problems and more. tsc -w can’t run on multiple config files at once.Invoking tsc twice incurs more startup time overhead.There’s no built-in up-to-date checking, so you end up always running tsc twice.You could use multiple tsconfig files to solve some of those problems, but new ones would appear: Changing just the tests required typechecking the implementation again, even if nothing changed.Changing just the internals in the implementation files required typechecking the tests again, even though this wouldn’t ever cause new errors.It wasn’t possible to build test and src at the same time without having src appear in the output folder name, which you probably don’t want.It was possible for the implementation files to import the test files.Previously, this structure was rather awkward to work with if you used a single tsconfig file:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |