From 958632527870f4a661774169f0274eb5d1070cab Mon Sep 17 00:00:00 2001 From: tjcouch-sil Date: Thu, 30 Nov 2023 18:56:59 -0600 Subject: [PATCH] Added cache/extension-types to typeRoots for easy sharing extension types --- tsconfig.json | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 5f73ea1..5a78f8a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,11 +26,29 @@ "node_modules/@types", // Include papi-dts type declarations (for papi.d.ts) "../paranext-core/lib", - // Include other extensions' type declarations + // Include core extensions' type declarations "../paranext-core/extensions/src", // Include this extension's type declarations. It's in this location so there aren't any // unexpected files there for typeRoots to include - "src/types" + "src/types", + + /** + * Add extension repos' `src/types` folders here if you want to use local development type + * declarations. These will override the cached extension type declarations included in + * final entry in this array. Note that running extensions' local development type + * declaration files get copied into the cached extension type declarations while running + * Platform.Bible in development, but adding extension repos' `src/types` folders here means + * the local development type declarations will always be up-to-date instead of only when + * Platform.Bible is running in development. + * + * @example Adding `"../paranext-extension-word-list/src/types",` includes the local version + * of the Word List extension's type declarations. Then, your extension can use types from the + * local build of the Word List extension. + */ + + // Include cached extension type declarations in case this extension needs to depend on them + // These are last, so any modules in the above typeRoots take precedence. + "../paranext-core/dev-appdata/cache/extension-types" ], // Papi exposes decorators for use in classes "experimentalDecorators": true,