Let TypeScript resolve JSON files in jspsych package

This commit is contained in:
bjoluc 2022-11-21 09:25:51 +01:00
parent 7ab1734ac6
commit 1375339f63
3 changed files with 3 additions and 6 deletions

View File

@ -7,8 +7,7 @@
"jspsych": ["../jspsych/src"],
"@jspsych/*": ["../*/src"]
},
// allow resolving json modules in tests (needed for transitive imports of jspsych in tests;
// the jspsych package itself uses https://stackoverflow.com/a/61426303 instead)
// allow resolving json modules in tests (needed for transitive imports of jspsych)
"resolveJsonModule": true
}
}

View File

@ -1 +0,0 @@
declare module "*.json"; // https://stackoverflow.com/a/61426303

View File

@ -1,8 +1,7 @@
{
"extends": "@jspsych/config/tsconfig.core.json",
"compilerOptions": {
"baseUrl": ".",
"resolveJsonModule": false // using https://stackoverflow.com/a/61426303 instead
"baseUrl": "."
},
"include": ["src", "tests", "global.d.ts"]
"include": ["src", "tests", "package.json"]
}