1
0
mirror of https://github.com/flarum/core.git synced 2025-08-01 06:00:24 +02:00

Add configuration for global typings (#2)

Support for https://github.com/flarum/core/pull/2992
This commit is contained in:
David Wheatley
2021-08-15 21:01:53 +02:00
committed by GitHub
parent 6040aa0da9
commit 81eb4804e5

View File

@@ -19,8 +19,10 @@ A baseline `tsconfig.json` is provided below that you can modify as needed. This
{
// Use Flarum's tsconfig as a starting point
"extends": "flarum-tsconfig",
// This will match all .ts, .tsx, .d.ts, .js, .jsx files
"include": ["src/**/*"],
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
// and also tells your Typescript server to read core's global typings for
// access to `dayjs` and `$` in the global namespace.
"include": ["src/**/*", "../vendor/flarum/core/js/dist-typings/@types/**/*"],
"compilerOptions": {
// This will output typings to `dist-typings`
"declarationDir": "./dist-typings",