Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cache/extension-types to typeRoots for easy sharing extension types #10

Merged
merged 5 commits into from
Dec 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down